php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/lampp/proftpd/scripts/ |
files >> //opt/lampp/proftpd/scripts/ctl.sh |
#!/bin/sh ERROR=0 FTP_STATUS="" FTP_PIDFILE=/opt/lampp/var/proftpd.pid FTPD=/opt/lampp/sbin/proftpd get_pid() { PID="" PIDFILE=$1 # check for pidfile if [ -f "$PIDFILE" ] ; then PID=`cat $PIDFILE` fi } get_ftp_pid() { get_pid $FTP_PIDFILE if [ ! "$PID" ]; then return fi if [ "$PID" -gt 0 ]; then FTP_PID=$PID fi } is_service_running() { PID=$1 if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then RUNNING=1 else RUNNING=0 fi return $RUNNING } is_ftp_running() { get_ftp_pid is_service_running $FTP_PID RUNNING=$? if [ $RUNNING -eq 0 ]; then FTP_STATUS="proftpd not running" else FTP_STATUS="proftpd already running" fi return $RUNNING } test_ftp_config() { if $FTPD -t; then ERROR=0 else ERROR=8 echo "proftpd config test fails, aborting" exit $ERROR fi } start_ftp() { test_ftp_config is_ftp_running RUNNING=$? if [ $RUNNING -eq 1 ]; then echo "$0 $ARG: proftpd (pid $FTP_PID) already running" else /opt/lampp/lampp startftp > /dev/null RESULT=$? if [ $RUNNING -eq 0 ]; then echo "$0 $ARG: proftpd started" else echo "$0 $ARG: proftpd could not be started" ERROR=3 fi fi } stop_ftp() { NO_EXIT_ON_ERROR=$1 test_ftp_config is_ftp_running RUNNING=$? if [ $RUNNING -eq 0 ]; then echo "$0 $ARG: $FTP_STATUS" if [ "x$NO_EXIT_ON_ERROR" != "xno_exit" ]; then exit else return fi fi /opt/lampp/lampp stopftp > /dev/null RESULT=$? if [ $RESULT -eq 0 ]; then echo "$0 $ARG: proftpd stopped" else echo "$0 $ARG: proftpd could not be stopped" ERROR=4 fi } cleanpid() { rm -f $FTP_PIDFILE } if [ "x$1" = "xstart" ]; then start_ftp sleep 5 elif [ "x$1" = "xstop" ]; then stop_ftp sleep 2 elif [ "x$1" = "xstatus" ]; then is_ftp_running echo "$FTP_STATUS" elif [ "x$1" = "xcleanpid" ]; then cleanpid fi exit $ERRORy~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`