pvedaemon 1009 Bytes
Newer Older
1 2 3 4
#!/bin/sh

### BEGIN INIT INFO
# Provides:        pvedaemon
5 6
# Required-Start:  $remote_fs $network $syslog pve-cluster cman clvm
# Required-Stop:   $remote_fs $network $syslog pve-cluster cman clvm
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# Default-Start:   2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: PVE Daemon
### END INIT INFO

. /lib/lsb/init-functions

PATH=/sbin:/bin:/usr/bin:/usr/sbin
DAEMON=/usr/bin/pvedaemon
NAME=pvedaemon
DESC="PVE Daemon"
PIDFILE=/var/run/pvedaemon.pid

test -f $DAEMON || exit 0

# avoid warnings about uninstalled locales when pvedaemon executes commands
export LC_ALL="C"

case "$1" in
	start)
		log_daemon_msg "Starting $DESC" "$NAME"
28
		$DAEMON start
29 30 31 32
		log_end_msg $?
  		;;
	stop)
		log_daemon_msg "Stopping $DESC" "$NAME"
33
		$DAEMON stop
34 35
		log_end_msg $?
  		;;
36
	restart|reload|force-reload)
37
		log_daemon_msg "Restarting $DESC" "$NAME"
38 39 40
		$DAEMON restart

 		log_end_msg $?
41 42 43
  		;;
	*)
	        N=/etc/init.d/$NAME
44
  		echo "Usage: $N {start|stop|restart|reload|force-reload}"
45 46 47 48 49
  		exit 1
		;;
esac

exit 0