summaryrefslogtreecommitdiff
path: root/systemctl.vala
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-21 03:27:44 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-21 03:27:44 +0200
commita16e112358ea8fea381ee106b89e645aed8b0a8c (patch)
treef38b204ec041c25974397a7711a105cbe7509c07 /systemctl.vala
parent0d9068141e07ba29483ebe8bc4aaed6aacde1562 (diff)
reload: implement reload/reexec logic
Diffstat (limited to 'systemctl.vala')
-rw-r--r--systemctl.vala12
1 files changed, 10 insertions, 2 deletions
diff --git a/systemctl.vala b/systemctl.vala
index 4de856e756..c435e558e8 100644
--- a/systemctl.vala
+++ b/systemctl.vala
@@ -85,7 +85,9 @@ int main (string[] args) {
" reload [NAME...] Reload on or more units\n" +
" monitor Monitor unit/job changes\n" +
" dump Dump servier status\n" +
- " snapshot [NAME] Create a snapshot\n");
+ " snapshot [NAME] Create a snapshot\n" +
+ " daemon-reload Reload daemon configuration\n" +
+ " daemon-reexecute Reexecute daemon\n");
try {
context.parse(ref args);
@@ -236,7 +238,13 @@ int main (string[] args) {
"org.freedesktop.systemd1.Unit") as Unit;
stdout.printf("%s\n", u.id);
- } else {
+ } else if (args[1] == "daemon-reload")
+ manager.reload();
+ else if (args[1] == "daemon-reexecute" || args[1] == "daemon-reexec")
+ manager.reexecute();
+ else if (args[1] == "daemon-exit")
+ manager.exit();
+ else {
stderr.printf("Unknown command %s.\n", args[1]);
return 1;
}