2014-12-18 10:42:27 +01:00

55 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
### BEGIN INIT INFO
# Provides: pvestatd
# Required-Start: $remote_fs $network $syslog pve-cluster pvedaemon cman clvm
# Required-Stop: $remote_fs $network $syslog pve-cluster pvedaemon cman clvm
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: PVE Status Daemon
### END INIT INFO
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/bin:/usr/sbin
NAME=pvestatd
DAEMON=/usr/bin/pvestatd
DESC="PVE Status Daemon"
PIDFILE=/var/run/pvestatd.pid
# Exit if the package is not installed
test -f $DAEMON || exit 0
[ -e /proxmox_install_mode ] && exit 0
# avoid warnings about uninstalled locales
export LC_ALL="C"
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
$DAEMON start
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
$DAEMON stop
log_end_msg $?
;;
status)
$DAEMON status
;;
reload|restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
$DAEMON restart
log_end_msg $?
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|status|reload|restart|force-reload}" >&2
exit 1
;;
esac
exit 0