summaryrefslogtreecommitdiff
path: root/package/tntnet/files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2012-08-22 13:08:42 +0200
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>2012-08-22 13:08:42 +0200
commitb5ef0800a597e0c87e169139838db5339e8fc6e4 (patch)
treeb746dab4aceaec30107d393da004df2add846b99 /package/tntnet/files
parent7954547fd1b1661c82cbacea2b5bfdd491ac46ab (diff)
update to latest upstream version
Diffstat (limited to 'package/tntnet/files')
-rw-r--r--package/tntnet/files/tntnet.init26
-rw-r--r--package/tntnet/files/tntnet.postinst2
2 files changed, 27 insertions, 1 deletions
diff --git a/package/tntnet/files/tntnet.init b/package/tntnet/files/tntnet.init
new file mode 100644
index 000000000..e7e2e19c7
--- /dev/null
+++ b/package/tntnet/files/tntnet.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#PKG tntnet
+#INIT 90
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${tntnet:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/bin/tntnet /etc/tntnet/tntnet.conf
+ ;;
+stop)
+ kill $(pgrep -f /usr/bin/tntnet)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?
diff --git a/package/tntnet/files/tntnet.postinst b/package/tntnet/files/tntnet.postinst
index 9d462f8d3..8a86ea6b0 100644
--- a/package/tntnet/files/tntnet.postinst
+++ b/package/tntnet/files/tntnet.postinst
@@ -1,6 +1,6 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
-add_rcconf tntnet
+add_rcconf tntnet tntnet NO
gid=$(get_next_gid)
add_group tntnet $gid
add_user tntnet $(get_next_uid) $gid /www