Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1172 | dev | 1 | #! /bin/sh |
2 | set -e |
||
3 | |||
4 | # /etc/init.d/rebootd: start and stop the reboot daemon |
||
5 | |||
6 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" |
||
7 | |||
8 | case "$1" in |
||
9 | start) |
||
10 | echo -n "Starting rebootd" |
||
11 | start-stop-daemon --start --quiet --pidfile /var/run/rebootd.pid \ |
||
12 | --exec /usr/local/sbin/rebootd -- --config /etc/rebootd.conf |
||
13 | echo "." |
||
14 | ;; |
||
15 | stop) |
||
16 | echo -n "Stopping rebootd" |
||
17 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/rebootd.pid |
||
18 | echo "." |
||
19 | ;; |
||
20 | |||
21 | reload|force-reload) |
||
22 | echo -n "Reloading rebootd configuration" |
||
23 | start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/rebootd.pid \ |
||
24 | --exec /usr/local/sbin/rebootd -- --config /etc/rebootd.conf |
||
25 | echo "." |
||
26 | ;; |
||
27 | |||
28 | restart) |
||
29 | echo -n "Restarting rebootd" |
||
30 | start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /var/run/rebootd.pid |
||
31 | start-stop-daemon --start --quiet --pidfile /var/run/rebootd.pid \ |
||
32 | --exec /usr/local/sbin/rebootd -- --config /etc/rebootd.conf |
||
33 | echo "." |
||
34 | ;; |
||
35 | |||
36 | *) |
||
37 | echo "Usage: /etc/init.d/rebootd {start|stop|reload|force-reload|restart}" |
||
38 | exit 1 |
||
39 | esac |
||
40 | |||
41 | exit 0 |