summaryrefslogtreecommitdiff
path: root/package/proftpd/files/proftpd.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/proftpd/files/proftpd.init')
-rw-r--r--package/proftpd/files/proftpd.init30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/proftpd/files/proftpd.init b/package/proftpd/files/proftpd.init
new file mode 100644
index 000000000..bf3dc0efe
--- /dev/null
+++ b/package/proftpd/files/proftpd.init
@@ -0,0 +1,30 @@
+#!/bin/sh
+#PKG proftpd
+#INIT 60
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${proftpd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/proftpd.conf ] || exit
+ proftpd
+ ;;
+stop)
+ pkill proftpd
+ ;;
+restart)
+ sh $0 stop
+ sleep 1
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?