#!/bin/bash
PATH=’/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin’
FTP=”$(which pure-ftpd)”
###########################################################################################
#START=”/etc/pureftp/pure-config.pl /etc/pureftp/pure-ftpd.conf” #
# Die Zeile über mir erzeugt Fehlermeldungen von Perl welche sich nicht unterdrücken lassen. Deswegen unter mir der Aufrufstring den das Perl #
#Script erzeugt. #
###########################################################################################
START=”/usr/local/sbin/pure-ftpd 1 -A -c50 -B -C8 -d -D -E -fftp -H -I15 -lmysql:/etc/pureftp/pureftpd-mysql.conf -L10000:8 -m4 -s -U133:022 -u100 -j -k99 -Z”
NAME=’pure-ftpd’
PID=”$(pidof $FTP)”
test -x $FTP || exit 0
set -e
case “$1” in
start)
echo -n “Starting $NAME”
echo
$START 1&2> /dev/null
;;
stop)
echo -n “Stopping $NAME ”
echo
kill -9 $PID 1&2> /dev/null
;;
status)
[ -z $PID ] || echo “$NAME is running with PID $PID ”
[ -z $PID ] && echo “$NAME is not running”
;;
restart|force-reload)
bash $0 stop
sleep 1
bash $0 start
;;
*)
N=/etc/init.d/$NAME
echo “Usage: $N {start|stop|restart|force-reload}” >&2
exit 1
;;
esac
exit 0