Annotation of embedaddon/miniupnpd/linux/miniupnpd.init.d.script, revision 1.1

1.1     ! misho       1: #!/bin/sh
        !             2: # $Id: miniupnpd.init.d.script,v 1.2 2007/09/23 16:11:12 nanard Exp $
        !             3: # MiniUPnP project
        !             4: # author: Thomas Bernard
        !             5: # website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
        !             6: 
        !             7: MINIUPNPD=/usr/sbin/miniupnpd
        !             8: ARGS='-f /etc/miniupnpd/miniupnpd.conf'
        !             9: 
        !            10: IPTABLES_CREATE=/etc/miniupnpd/iptables_init.sh
        !            11: IPTABLES_REMOVE=/etc/miniupnpd/iptables_removeall.sh
        !            12: 
        !            13: test -f $MINIUPNPD || exit 0
        !            14: 
        !            15: . /lib/lsb/init-functions
        !            16: 
        !            17: case "$1" in
        !            18: start)  log_daemon_msg "Starting miniupnpd" "miniupnpd"
        !            19:                $IPTABLES_CREATE > /dev/null 2>&1
        !            20:         start-stop-daemon --start --quiet --pidfile /var/run/miniupnpd.pid --startas $MINIUPNPD -- $ARGS $LSBNAMES
        !            21:         log_end_msg $?
        !            22:         ;;
        !            23: stop)   log_daemon_msg "Stopping miniupnpd" "miniupnpd"
        !            24:         start-stop-daemon --stop --quiet --pidfile /var/run/miniupnpd.pid
        !            25:         log_end_msg $?
        !            26:         $IPTABLES_REMOVE > /dev/null 2>&1
        !            27:         ;;
        !            28: restart|reload|force-reload)
        !            29:         log_daemon_msg "Restarting miniupnpd" "miniupnpd"
        !            30:         start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/miniupnpd.pid
        !            31:         $IPTABLES_REMOVE > /dev/null 2>&1
        !            32:                $IPTABLES_CREATE > /dev/null 2>&1
        !            33:         start-stop-daemon --start --quiet --pidfile /var/run/miniupnpd.pid --startas $MINIUPNPD -- $ARGS $LSBNAMES
        !            34:         log_end_msg $?
        !            35:         ;;
        !            36: *)      log_action_msg "Usage: /etc/init.d/miniupnpd {start|stop|restart|reload|force-reload}"
        !            37:         exit 2
        !            38:         ;;
        !            39: esac
        !            40: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>