projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
862678d
)
Deb init.d script implements 'reload' using SIGUSR1
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 10 May 2012 11:55:25 +0000
(13:55 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 10 May 2012 11:55:25 +0000
(13:55 +0200)
debian/metaproxy.init
patch
|
blob
|
history
diff --git
a/debian/metaproxy.init
b/debian/metaproxy.init
index
6b72823
..
1bbcfd7
100644
(file)
--- a/
debian/metaproxy.init
+++ b/
debian/metaproxy.init
@@
-81,7
+81,7
@@
do_stop()
}
#
}
#
-# Function that sends a SIGHUP to the daemon/service
+# Function that sends a SIGUSR1 to the daemon/service
#
do_reload() {
#
#
do_reload() {
#
@@
-89,7
+89,13
@@
do_reload() {
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
- start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 1 ] && return 0
+ [ "$RETVAL" != 0 ] && return $RETVAL
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_OPTS \
+ || return 2
return 0
}
return 0
}
@@
-116,16
+122,16
@@
case "$1" in
;;
esac
;;
;;
esac
;;
- #reload|force-reload)
+ reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#
# 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 $?
- #;;
- restart|force-reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
+ restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
@@
-148,8
+154,7
@@
case "$1" in
esac
;;
*)
esac
;;
*)
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
exit 3
;;
esac
exit 3
;;
esac