- Timestamp:
- Mar 28, 2008, 9:10:53 PM (16 years ago)
- Location:
- trunk/packages/sipb-xen-iptables
- Files:
-
- 2 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-iptables/debian/sipb-xen-iptables.init
r292 r294 1 1 #! /bin/sh 2 2 ### BEGIN INIT INFO 3 # Provides: sipb-xen- dhcp3 # Provides: sipb-xen-iptables 4 4 # Required-Start: $local_fs $remote_fs 5 5 # Required-Stop: $local_fs $remote_fs 6 6 # Default-Start: 2 3 4 5 7 7 # Default-Stop: 0 1 6 8 # Short-Description: sipb-xen DHCP server8 # Short-Description: sipb-xen iptables rules 9 9 # Description: 10 10 ### END INIT INFO … … 16 16 # PATH should only include /usr/* if it runs after the mountnfs.sh script 17 17 PATH=/sbin:/usr/sbin:/bin:/usr/bin 18 DESC="The sipb-xen DHCP server" 19 NAME=sipb-xen-dhcp 20 DAEMON=/usr/local/lib/sipb-xen-dhcp/dhcpserver.py 21 DAEMON_ARGS="" 22 PIDFILE=/var/run/$NAME.pid 23 SCRIPTNAME=/etc/init.d/$NAME 24 25 # Exit if the package is not installed 26 [ -x "$DAEMON" ] || exit 0 18 DESC="Load the sipb-xen iptables rules" 19 NAME=sipb-xen-iptables 20 RULES=/usr/local/share/sipb-xen-iptables/iptables.rules 27 21 28 22 # Read configuration variable file if it is present … … 45 39 # 1 if daemon was already running 46 40 # 2 if daemon could not be started 47 daemon --running -n $NAME && return 1 48 daemon -r -D "$(dirname $DAEMON)" -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2 41 /sbin/iptables-restore < $RULES 49 42 } 50 43 … … 59 52 # 2 if daemon could not be stopped 60 53 # other if a failure occurred 61 daemon --stop -n $NAME 62 RETVAL="$?" 63 [ "$RETVAL" = 2 ] && return 2 64 # Many daemons don't delete their pidfiles when they exit. 65 rm -f $PIDFILE 66 return "$RETVAL" 54 return 0 67 55 } 68 56
Note: See TracChangeset
for help on using the changeset viewer.