summaryrefslogtreecommitdiff
path: root/packages/vsftpd/files/init
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2008-12-23 06:52:35 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2008-12-23 06:52:35 +0100
commit005aed69752adc491683c7ee49cec9e52423ded9 (patch)
tree8e369e92c03709b469c51022e3dceac77c4fb27f /packages/vsftpd/files/init
parente67586ef836f3b960c23f7d4fa509a33b510cf0d (diff)
vsftpd: improve default configuration
* restrict anonymous user permissions * change anonymous ftp directory to /var/lib/ftp * reindent init script
Diffstat (limited to 'packages/vsftpd/files/init')
-rwxr-xr-xpackages/vsftpd/files/init40
1 files changed, 20 insertions, 20 deletions
diff --git a/packages/vsftpd/files/init b/packages/vsftpd/files/init
index f2e40b3eab..d0ec010dc7 100755
--- a/packages/vsftpd/files/init
+++ b/packages/vsftpd/files/init
@@ -3,7 +3,7 @@ DAEMON=/usr/sbin/vsftpd
NAME=vsftpd
DESC="FTP Server"
ARGS=""
-FTPDIR=/var/tmp/ftp
+FTPDIR=/var/lib/ftp
test -f $DAEMON || exit 0
@@ -12,30 +12,30 @@ set -e
case "$1" in
start)
echo -n "* starting $DESC: $NAME... "
- if ! test -d $FTPDIR; then
- mkdir -p $FTPDIR/in
- chown ftp $FTPDIR -R
- chmod a-w $FTPDIR
- chmod u+w $FTPDIR/in
- fi
- start-stop-daemon -S -b -x $DAEMON -- $ARGS
- echo "done."
- ;;
+ if ! test -d $FTPDIR; then
+ mkdir -p $FTPDIR/in
+ chown ftp $FTPDIR -R
+ chmod a-w $FTPDIR
+ chmod u+w $FTPDIR/in
+ fi
+ start-stop-daemon -S -b -x $DAEMON -- $ARGS
+ echo "done."
+ ;;
stop)
echo -n "* stopping $DESC: $NAME... "
- start-stop-daemon -K -x $DAEMON
- echo "done."
- ;;
+ start-stop-daemon -K -x $DAEMON
+ echo "done."
+ ;;
restart)
echo "* restarting $DESC: $NAME... "
- $0 stop
- $0 start
- echo "done."
- ;;
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
*)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
- ;;
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
esac
exit 0