version 1.1.1.1, 2012/02/21 23:16:02
|
version 1.1.1.2, 2013/07/22 00:32:35
|
Line 4
|
Line 4
|
# author: Thomas Bernard |
# author: Thomas Bernard |
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
|
|
|
### BEGIN INIT INFO |
|
# Provides: miniupnpd |
|
# Required-Start: $remote_fs $syslog |
|
# Required-Stop: $remote_fs $syslog |
|
# Default-Start: 2 3 4 5 |
|
# Default-Stop: 0 1 6 |
|
# Short-Description: MiniUPnPd port-forwarding daemon |
|
### END INIT INFO |
|
|
|
set -e |
|
|
MINIUPNPD=/usr/sbin/miniupnpd |
MINIUPNPD=/usr/sbin/miniupnpd |
ARGS='-f /etc/miniupnpd/miniupnpd.conf' |
ARGS='-f /etc/miniupnpd/miniupnpd.conf' |
|
|
Line 15 test -f $MINIUPNPD || exit 0
|
Line 26 test -f $MINIUPNPD || exit 0
|
. /lib/lsb/init-functions |
. /lib/lsb/init-functions |
|
|
case "$1" in |
case "$1" in |
start) log_daemon_msg "Starting miniupnpd" "miniupnpd" | start) |
$IPTABLES_CREATE > /dev/null 2>&1 | log_daemon_msg "Starting miniupnpd" "miniupnpd" |
start-stop-daemon --start --quiet --pidfile /var/run/miniupnpd.pid --startas $MINIUPNPD -- $ARGS $LSBNAMES | $IPTABLES_CREATE > /dev/null 2>&1 |
log_end_msg $? | start-stop-daemon --start --quiet --pidfile /var/run/miniupnpd.pid --startas $MINIUPNPD -- $ARGS $LSBNAMES |
;; | log_end_msg $? |
stop) log_daemon_msg "Stopping miniupnpd" "miniupnpd" | ;; |
start-stop-daemon --stop --quiet --pidfile /var/run/miniupnpd.pid | stop) |
log_end_msg $? | log_daemon_msg "Stopping miniupnpd" "miniupnpd" |
$IPTABLES_REMOVE > /dev/null 2>&1 | start-stop-daemon --stop --quiet --pidfile /var/run/miniupnpd.pid |
;; | log_end_msg $? |
restart|reload|force-reload) | $IPTABLES_REMOVE > /dev/null 2>&1 |
log_daemon_msg "Restarting miniupnpd" "miniupnpd" | ;; |
start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/miniupnpd.pid | restart|reload|force-reload) |
$IPTABLES_REMOVE > /dev/null 2>&1 | log_daemon_msg "Restarting miniupnpd" "miniupnpd" |
$IPTABLES_CREATE > /dev/null 2>&1 | start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/miniupnpd.pid |
start-stop-daemon --start --quiet --pidfile /var/run/miniupnpd.pid --startas $MINIUPNPD -- $ARGS $LSBNAMES | $IPTABLES_REMOVE > /dev/null 2>&1 |
log_end_msg $? | $IPTABLES_CREATE > /dev/null 2>&1 |
;; | start-stop-daemon --start --quiet --pidfile /var/run/miniupnpd.pid --startas $MINIUPNPD -- $ARGS $LSBNAMES |
*) log_action_msg "Usage: /etc/init.d/miniupnpd {start|stop|restart|reload|force-reload}" | log_end_msg $? |
exit 2 | ;; |
;; | status) |
| status_of_proc /usr/sbin/miniupnpd miniupnpd |
| ;; |
| *) |
| log_action_msg "Usage: /etc/init.d/miniupnpd {start|stop|restart|reload|force-reload}" |
| exit 2 |
| ;; |
esac |
esac |
exit 0 |
exit 0 |