[pkg-go] Bug#817403: prometheus: config reload for sysv init script
Filippo Giunchedi
filippo at debian.org
Wed Mar 9 19:53:58 UTC 2016
Package: prometheus
Version: 0.16.1-0
Severity: normal
Tags: patch
hi!
(sort of related to #814802) it'd be nice to have config reload in the sysv
init script too, e.g. something like the following:
diff --git a/debian/init b/debian/init
index 4efd831..c05c108 100755
--- a/debian/init
+++ b/debian/init
@@ -68,3 +68,17 @@ do_stop_cmd()
$HELPER $HELPER_ARGS --running || return 0
return 2
}
+
+do_reload()
+{
+ log_daemon_msg "Reloading $DESC configuration files" "$NAME"
+ $HELPER $HELPER_ARGS --running || return 1
+ helper_pid=$(cat $PIDFILE)
+ if [ -z "$helper_pid" ]; then
+ log_failure_msg "Unable to find PID"
+ return 1
+ fi
+ start-stop-daemon --stop --signal 1 --quiet \
+ --ppid "$helper_pid" --exec "$DAEMON"
+ log_end_msg $?
+}
what do you think?
More information about the Pkg-go-maintainers
mailing list