diff options
author | Christian Hesse <mail@eworm.de> | 2017-01-06 10:00:43 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-01-06 10:00:43 +0100 |
commit | 9d20d5d463eaa5db33fcc04f95c48d1f2edd0363 (patch) | |
tree | e3ef2e17473890dc24244f7bd645af6adf4b6936 | |
parent | 48ce76c01af56785aeb2fb550d578d992e3394d8 (diff) | |
download | pacredir-9d20d5d463eaa5db33fcc04f95c48d1f2edd0363.tar.gz pacredir-9d20d5d463eaa5db33fcc04f95c48d1f2edd0363.tar.zst |
notify systemd on stop
-rw-r--r-- | pacredir.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -726,6 +726,9 @@ int main(int argc, char ** argv) { /* run the main loop */ avahi_simple_poll_loop(simple_poll); + /* report stopping to systemd */ + sd_notify(0, "STOPPING=1\nSTATUS=Stopping..."); + /* stop http server */ MHD_stop_daemon(mhd); @@ -763,6 +766,8 @@ fail: if (simple_poll) avahi_simple_poll_free(simple_poll); + sd_notify(0, "STATUS=Stopped. Bye!"); + return ret; } |