]> git.proxmox.com Git - pve-firewall.git/blob - debian/pve-firewall.init
Add router-solicitation to NeighborDiscovery macro
[pve-firewall.git] / debian / pve-firewall.init
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: Proxmox VE firewall
10 ### END INIT INFO
11
12 . /lib/lsb/init-functions
13
14 PATH=/sbin:/bin:/usr/bin:/usr/sbin
15 NAME=pve-firewall
16 DAEMON=/usr/sbin/$NAME
17 DESC="Proxmox VE firewall"
18 PIDFILE=/var/run/$NAME.pid
19
20 # Exit if the package is not installed
21 [ -x "$DAEMON" ] || exit 0
22 [ -e /proxmox_install_mode ] && exit 0
23
24 START_FIREWALL=yes
25
26 # Read configuration variable file if it is present
27 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
28
29 [ "$START_FIREWALL" = "yes" ] || exit 0
30
31 # Load the VERBOSE setting and other rcS variables
32 . /lib/init/vars.sh
33
34 # Define LSB log_* functions.
35 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
36 # and status_of_proc is working.
37 . /lib/lsb/init-functions
38
39 # avoid warnings about uninstalled locales
40 export LC_ALL="C"
41
42 case "$1" in
43 start)
44 log_daemon_msg "Starting $DESC" "$NAME"
45 $DAEMON start
46 log_end_msg $?
47 ;;
48 stop)
49 log_daemon_msg "Stopping $DESC" "$NAME"
50 $DAEMON stop
51 log_end_msg $?
52 ;;
53 status)
54 $DAEMON status
55 ;;
56 reload|restart|force-reload)
57 log_daemon_msg "Restarting $DESC" "$NAME"
58 $DAEMON restart
59 log_end_msg $?
60 ;;
61 *)
62 N=/etc/init.d/$NAME
63 echo "Usage: $N {start|stop|status|restart|force-reload}"
64 exit 1
65 ;;
66 esac
67
68 exit 0