# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/pure-ftpd/pure-ftpd.init # Copyright (C) 2008 - 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- # Desc: pure-ftp daemon # Runlevel: 40 rcX # NAME=pure-ftpd OPTIONS="-A -B -E -s -c 5" PIDFILE=/var/run/pure-ftpd.pid main_begin block_begin(start, `Starting $NAME') check(`D_sbindir/pure-ftpd $OPTIONS -g $PIDFILE') block_end block_begin(stop, `Stopping $NAME') check(`if [ -s $PIDFILE ]; then kill $(cat $PIDFILE) else echo "$NAME is not running or $PIDFILE disappeared." error=1 fi') block_end block_begin(restart, `Restarting $NAME') check(`if [ -s $PIDFILE ]; then kill -HUP $(cat $PIDFILE) else echo "$NAME is not running or $PIDFILE disappeared." error=1 fi') block_end block_begin(status, `Checking $NAME') check(`pid=$(pidof pure-ftpd) if [ -n $pid ]; then echo -n "$NAME is running (PID $pid)" else echo -n "$NAME is stopped" fi') block_end main_end