4 # Required-Start: $local_fs $remote_fs $network $named $time
5 # Required-Stop: $local_fs $remote_fs
6 # Default-Start: 2 3 4 5
8 # Short-Description: Metaproxy server
9 # Description: Debian init script for the Metaproxy server
12 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
13 DAEMON=/usr/bin/metaproxy
17 test -x $DAEMON || exit 0
19 # Include metaproxy defaults if available
20 if [ -f /etc/default/metaproxy ] ; then
21 . /etc/default/metaproxy
28 echo -n "Starting $DESC: "
29 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
30 --exec $DAEMON -- $DAEMON_OPTS
34 echo -n "Stopping $DESC: "
35 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/$NAME.pid \
41 # If the daemon can reload its config files on the fly
42 # for example by sending it SIGHUP, do it here.
44 # If the daemon responds to changes in its config file
45 # directly anyway, make this a do-nothing entry.
47 # echo "Reloading $DESC configuration files."
48 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
49 # /var/run/$NAME.pid --exec $DAEMON
53 # If the "reload" option is implemented, move the "force-reload"
54 # option to the "reload" entry above. If not, "force-reload" is
55 # just the same as "restart" except that it does nothing if the
56 # daemon isn't already running.
57 # check wether $DAEMON is running. If so, restart
58 start-stop-daemon --stop --test --quiet --pidfile \
59 /var/run/$NAME.pid --exec $DAEMON \
64 echo -n "Restarting $DESC: "
65 start-stop-daemon --stop --quiet --oknodo --pidfile \
66 /var/run/$NAME.pid --exec $DAEMON
68 start-stop-daemon --start --quiet --pidfile \
69 /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
74 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
75 echo "Usage: $N {start|stop|restart|force-reload}" >&2