]>
git.proxmox.com Git - pve-manager.git/blob - bin/init.d/pveproxy
5 # Required-Start: $remote_fs $network $syslog pvedaemon
6 # Required-Stop: $remote_fs $network $syslog pvedaemon
7 # Default-Start: 2 3 4 5
9 # Short-Description: PVE API Proxy Server
12 .
/lib
/lsb
/init-functions
14 PATH
=/sbin
:/bin
:/usr
/bin
:/usr
/sbin
15 DAEMON
=/usr
/bin
/pveproxy
17 DESC
="PVE API Proxy Server"
18 RUNDIR
=/var
/run
/pveproxy
19 PIDFILE
=${RUNDIR}/pveproxy.pid
21 test -f $DAEMON ||
exit 0
23 # avoid warnings about uninstalled locales when pveproxy executes commands
26 mkdir
-p ${RUNDIR} || true
27 chmod 0700 ${RUNDIR} || true
28 chown www-data
:www-data
${RUNDIR} || true
32 log_daemon_msg
"Starting $DESC" "$NAME"
33 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON
37 log_daemon_msg
"Stopping $DESC" "$NAME"
38 start-stop-daemon
--stop --quiet --retry TERM
/2/TERM
/10/KILL
/2 --pidfile $PIDFILE
42 log_daemon_msg
"Reloading $DESC" "$NAME"
43 if ( [ -e $PIDFILE ] && kill -0 `cat $PIDFILE`) then
44 start-stop-daemon
--stop --signal HUP
--pidfile $PIDFILE
46 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON
51 log_daemon_msg
"Restarting $DESC" "$NAME"
52 start-stop-daemon
--stop --quiet --retry TERM
/2/TERM
/10/KILL
/2 --pidfile $PIDFILE
54 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON
59 echo "Usage: $N {start|stop|restart|force-reload}"