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

    1: #!/bin/sh
    2: # $Id: minissdpd.init.d.script,v 1.1.1.1 2023/09/27 11:25:11 misho Exp $
    3: # MiniUPnP project
    4: # author: Thomas Bernard
    5: # website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
    6: 
    7: MINISSDPD=/usr/sbin/minissdpd
    8: PIDFILE=/var/run/minissdpd.pid
    9: # get default interface
   10: IF=`route | grep default |awk -- '{ print $8 }'`
   11: ARGS="-i $IF"
   12: 
   13: test -f $MINISSDPD || exit 0
   14: 
   15: . /lib/lsb/init-functions
   16: 
   17: case "$1" in
   18: start)  log_daemon_msg "Starting minissdpd" "minissdpd"
   19:         start-stop-daemon --start --quiet --pidfile $PIDFILE \
   20:            --exec $MINISSDPD -- $ARGS $LSBNAMES
   21:         log_end_msg $?
   22:         ;;
   23: stop)   log_daemon_msg "Stopping minissdpd" "minissdpd"
   24:         start-stop-daemon --stop --quiet --pidfile $PIDFILE
   25:         log_end_msg $?
   26:         ;;
   27: restart|reload|force-reload)
   28:         log_daemon_msg "Restarting minissdpd" "minissdpd"
   29:         start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE
   30:         start-stop-daemon --start --quiet --pidfile $PIDFILE \
   31:            --exec $MINISSDPD -- $ARGS $LSBNAMES
   32:         log_end_msg $?
   33:         ;;
   34: *)      log_action_msg "Usage: /etc/init.d/minissdpd {start|stop|restart|reload|force-reload}"
   35:         exit 2
   36:         ;;
   37: esac
   38: exit 0
   39: 

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