]> git.proxmox.com Git - pve-manager.git/blame - bin/init.d/pvedaemon
rename pve-manager.service to pve-guests
[pve-manager.git] / bin / init.d / pvedaemon
CommitLineData
aff192e6
DM
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: pvedaemon
08b86ef3
DM
5# Required-Start: $remote_fs $network $syslog pve-cluster cman clvm
6# Required-Stop: $remote_fs $network $syslog pve-cluster cman clvm
aff192e6
DM
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: PVE Daemon
10### END INIT INFO
11
12. /lib/lsb/init-functions
13
14PATH=/sbin:/bin:/usr/bin:/usr/sbin
15DAEMON=/usr/bin/pvedaemon
16NAME=pvedaemon
17DESC="PVE Daemon"
18PIDFILE=/var/run/pvedaemon.pid
19
20test -f $DAEMON || exit 0
21
22# avoid warnings about uninstalled locales when pvedaemon executes commands
23export LC_ALL="C"
24
25case "$1" in
26 start)
27 log_daemon_msg "Starting $DESC" "$NAME"
6669b51c 28 $DAEMON start
aff192e6
DM
29 log_end_msg $?
30 ;;
31 stop)
32 log_daemon_msg "Stopping $DESC" "$NAME"
6669b51c 33 $DAEMON stop
aff192e6
DM
34 log_end_msg $?
35 ;;
6669b51c 36 restart|reload|force-reload)
aff192e6 37 log_daemon_msg "Restarting $DESC" "$NAME"
6669b51c
DM
38 $DAEMON restart
39
40 log_end_msg $?
aff192e6
DM
41 ;;
42 *)
43 N=/etc/init.d/$NAME
6669b51c 44 echo "Usage: $N {start|stop|restart|reload|force-reload}"
aff192e6
DM
45 exit 1
46 ;;
47esac
48
49exit 0