From: Adam Dickmeiss Date: Mon, 3 Aug 2015 14:26:00 +0000 (+0200) Subject: Fix systemd: reload stops metaproxy MP-620 X-Git-Tag: v1.9.0~3 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=79841cb0e1e5a4943da025ecd11b31a7cf8f7b2c;p=metaproxy-moved-to-github.git Fix systemd: reload stops metaproxy MP-620 Detect systemd and just do nothing when reload/force-reload is used. Log, however, that it really is not reloading. --- diff --git a/debian/metaproxy.init b/debian/metaproxy.init index 7c54cc9..adfdd81 100644 --- a/debian/metaproxy.init +++ b/debian/metaproxy.init @@ -132,9 +132,15 @@ case "$1" in # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? + # our reload makes a new PID. systemd doesn't allow it. MP-620 + if test -n "$_use_systemctl"; then + log_daemon_msg "Using systemd. Not reloading $DESC" "$NAME" + log_end_msg 0 + else + log_daemon_msg "Reloading $DESC" "$NAME" + do_reload + log_end_msg $? + fi ;; restart) #