Fix portmap running now as nobody (#2317)
[openwrt/svn-archive/archive.git] / net / portmap / files / portmap.init
index 31a3399e93c3a023a5f8a6e5c74bd5bd3ea0fc68..3bbfb573f8c2239b48fd74d7f66fb52dd8613be5 100644 (file)
@@ -1,16 +1,16 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
 
+START=40
 BIN=portmap
 DEFAULT=/etc/default/$BIN
-[ -f $DEFAULT ] && . $DEFAULT
 
-case $1 in
- start)
-  $BIN $OPTIONS
-  ;;
- *)
-  echo "usage: $0 start"
-  exit 1
-esac
+start() {
+       [ -f $DEFAULT ] && . $DEFAULT
+       $BIN $OPTIONS
+}
+
+stop() {
+       killall $BIN
+}
 
-exit $?