minimalist-pcproxy: Added.
[lede-routing/.git] / hnetd / files / pcp-script
1 #!/bin/sh
2 #-*-sh-*-
3 #
4 # $Id: pcp-script $
5 #
6 # Author: Markus Stenberg <mstenber@cisco.com>
7 #
8 # Copyright (c) 2014 cisco Systems, Inc.
9 #
10 # Created:       Fri Jan 17 11:46:30 2014 mstenber
11 # Last modified: Fri May 30 13:27:57 2014 mstenber
12 # Edit time:     16 min
13 #
14
15 # Copied from ohp-script.. Same idea. Just prod minimalist-pcproxy as
16 # needed, hoping the miniupnpd is taken care of by the system.
17
18 PCP=minimalist-pcproxy
19
20 start() {
21     $PCP $* &
22 }
23
24 stop() {
25     killall -9 $PCP
26 }
27
28
29 CMD=$1
30 # For debugging purposes
31 LOGNAME=`basename $0`
32 echo "$*" | logger -t "$LOGNAME"
33 case $CMD in
34   start)
35     shift
36     stop
37     start $*
38     ;;
39   stop)
40   stop
41     ;;
42   *)
43     echo "Only start [config]/stop supported"
44     exit 1
45   ;;
46 esac