mirror of
https://gh.wpcy.net/https://github.com/netcccyun/easypanel.git
synced 2026-04-23 03:52:25 +08:00
52 lines
1 KiB
Bash
52 lines
1 KiB
Bash
#!/bin/bash
|
|
#
|
|
# pureftpd
|
|
#
|
|
# chkconfig: - 85 15
|
|
# description: pureftpd is a ftp server
|
|
# processname: pureftpd
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
INITLOG_ARGS=""
|
|
prog=pureftpd
|
|
RETVAL=0
|
|
start() {
|
|
echo -n $"Starting $prog: "
|
|
if [ ! -f /vhs/kangle/bin/pureftp_auth ] ; then
|
|
echo "/vhs/kangle/pureftp_auth not found"
|
|
exit;
|
|
fi
|
|
/vhs/pure-ftpd/sbin/pure-authd --daemonize -s /var/run/ftpd.sock -r /vhs/kangle/bin/pureftp_auth
|
|
sleep 1
|
|
/vhs/pure-ftpd/sbin/pure-ftpd --daemonize -lextauth:/var/run/ftpd.sock {{$ftp_configs}}
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL = 0 ]
|
|
return $RETVAL
|
|
}
|
|
stop() {
|
|
echo -n $"Stopping $prog: "
|
|
killall pure-authd
|
|
killall pure-ftpd
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
stop
|
|
sleep 1
|
|
start
|
|
;;
|
|
*)
|
|
echo $"Usage: $prog {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|