File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / minissdpd / minissdpd.init.d.script
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Sep 27 11:25:11 2023 UTC (14 months, 4 weeks ago) by misho
Branches: miniupnpd, MAIN
CVS tags: v2_3_3p0, HEAD
Version 2.3.3p0

#!/bin/sh
# $Id: minissdpd.init.d.script,v 1.1.1.1 2023/09/27 11:25:11 misho Exp $
# MiniUPnP project
# author: Thomas Bernard
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

MINISSDPD=/usr/sbin/minissdpd
PIDFILE=/var/run/minissdpd.pid
# get default interface
IF=`route | grep default |awk -- '{ print $8 }'`
ARGS="-i $IF"

test -f $MINISSDPD || exit 0

. /lib/lsb/init-functions

case "$1" in
start)  log_daemon_msg "Starting minissdpd" "minissdpd"
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
           --exec $MINISSDPD -- $ARGS $LSBNAMES
        log_end_msg $?
        ;;
stop)   log_daemon_msg "Stopping minissdpd" "minissdpd"
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
        log_end_msg $?
        ;;
restart|reload|force-reload)
        log_daemon_msg "Restarting minissdpd" "minissdpd"
        start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
           --exec $MINISSDPD -- $ARGS $LSBNAMES
        log_end_msg $?
        ;;
*)      log_action_msg "Usage: /etc/init.d/minissdpd {start|stop|restart|reload|force-reload}"
        exit 2
        ;;
esac
exit 0


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