Skip to content

Commit 5d5963c

Browse files
cloudConfig: restart worker on submit
Restart osbuild-composer and the worker after updating the config, this is a necessary step for osbuild-composer to register the changes.
1 parent 6bb2130 commit 5d5963c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/store/cockpit/cockpitApi.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,23 @@ export const cockpitApi = contentSourcesApi.injectEndpoints({
645645
});
646646
});
647647

648+
// TODO: maybe give a warning that we need admin access?
649+
await cockpit.spawn(['systemctl', 'stop', 'osbuild-*'], {
650+
superuser: 'require',
651+
});
652+
653+
await cockpit.spawn(
654+
[
655+
'systemctl',
656+
'start',
657+
'osbuild-composer.socket',
658+
'osbuild-composer',
659+
],
660+
{
661+
superuser: 'require',
662+
}
663+
);
664+
648665
return { data: TOML.parse(contents) };
649666
} catch (error) {
650667
return { error };

0 commit comments

Comments
 (0)