summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/vsftpd/files/init
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/vsftpd/files/init')
-rwxr-xr-xmeta-networking/recipes-daemons/vsftpd/files/init41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/vsftpd/files/init b/meta-networking/recipes-daemons/vsftpd/files/init
new file mode 100755
index 000000000..d0ec010dc
--- /dev/null
+++ b/meta-networking/recipes-daemons/vsftpd/files/init
@@ -0,0 +1,41 @@
1#!/bin/sh
2DAEMON=/usr/sbin/vsftpd
3NAME=vsftpd
4DESC="FTP Server"
5ARGS=""
6FTPDIR=/var/lib/ftp
7
8test -f $DAEMON || exit 0
9
10set -e
11
12case "$1" in
13 start)
14 echo -n "* starting $DESC: $NAME... "
15 if ! test -d $FTPDIR; then
16 mkdir -p $FTPDIR/in
17 chown ftp $FTPDIR -R
18 chmod a-w $FTPDIR
19 chmod u+w $FTPDIR/in
20 fi
21 start-stop-daemon -S -b -x $DAEMON -- $ARGS
22 echo "done."
23 ;;
24 stop)
25 echo -n "* stopping $DESC: $NAME... "
26 start-stop-daemon -K -x $DAEMON
27 echo "done."
28 ;;
29 restart)
30 echo "* restarting $DESC: $NAME... "
31 $0 stop
32 $0 start
33 echo "done."
34 ;;
35 *)
36 echo "Usage: $0 {start|stop|restart}"
37 exit 1
38 ;;
39esac
40
41exit 0