1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/pureftpd/pureftpd.init
3 # Copyright (C) 2008 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # Desc: pure-ftp daemon
17 OPTIONS="-A -B -E -s -c 5"
18 PIDFILE=/var/run/pureftpd.pid
22 block_begin(start, `Starting $NAME')
23 check(`D_prefix/sbin/pure-ftpd $OPTIONS -g $PIDFILE')
26 block_begin(stop, `Stopping $NAME')
27 check(`if [ -s $PIDFILE ] ; then
30 echo "$NAME is not running or $PIDFILE disappeared."
35 block_begin(restart, `Restarting $NAME')
36 check(`if [ -s $PIDFILE ] ; then
37 kill -HUP $(cat $PIDFILE)
39 echo "$NAME is not running or $PIDFILE disappeared."
44 block_begin(status, `Checking $NAME')
45 check(`pid=$(pidof pure-ftpd)
47 echo -n "$NAME is running (PID $pid)"
49 echo -n "$NAME is stopped"