nico's buildroot-20040827-vsftpd.patch.txt
[openwrt/svn-archive/archive.git] / obsolete-buildroot / sources / openwrt / ipkg / vsftpd / root / etc / init.d / vsftpd
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/init.d/vsftpd b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/init.d/vsftpd
new file mode 100644 (file)
index 0000000..0152e4e
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+case $1 in
+ start)
+  [ -d /var/run/vsftpd ] || mkdir -p /var/run/vsftpd
+  /usr/sbin/vsftpd
+  ;;
+ stop)
+  pid=$(pidof vsftpd)
+  x=$$ # exclude our pid since we have the same name
+  pid=$(echo $pid | sed -e "s/$x//")
+  [ -n "$pid" ] && kill -TERM $pid
+  ;;
+ *)
+  echo "usage: $0 (start|stop)"
+  exit 1
+esac
+
+exit $?