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