From 79841cb0e1e5a4943da025ecd11b31a7cf8f7b2c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 3 Aug 2015 16:26:00 +0200 Subject: [PATCH] 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. --- debian/metaproxy.init | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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) # -- 1.7.10.4