2 # ganeti node daemon starter script
3 # based on skeleton from Debian GNU/Linux
5 PATH=/sbin:/bin:/usr/sbin:/usr/bin
6 DAEMON=/usr/local/sbin/ganeti-noded
8 SCRIPTNAME=/etc/init.d/ganeti
9 DESC="Ganeti node daemon"
11 test -f $DAEMON || exit 0
15 . /lib/lsb/init-functions
18 for fname in /var/lib/ganeti/ssconf_node_pass /var/lib/ganeti/server.pem; do
19 if ! [ -f "$fname" ]; then
21 log_warning_msg "Config $fname not there, will not run."
29 log_begin_msg "Starting $DESC..."
31 start-stop-daemon --start --quiet --exec $DAEMON || log_end_msg 1
35 log_begin_msg "Stopping $DESC..."
36 start-stop-daemon --stop --quiet --name $NAME || log_end_msg 1
40 log_begin_msg "Reloading $DESC..."
41 start-stop-daemon --stop --quiet --oknodo --retry 30 --name $NAME
43 start-stop-daemon --start --quiet --exec $DAEMON || log_end_msg 1
47 log_success_msg "Usage: $SCRIPTNAME {start|stop|force-reload|restart}"