https://t.me/RX1948
Server : Apache
System : Linux server.lienzindia.com 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User : plutus ( 1007)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /etc/rc1.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc1.d/K50pure-ftpd
#!/bin/sh

### BEGIN INIT INFO
# Provides:          pure-ftpd
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start and Stop pure-ftpd Server
# Description:       Start and Stop pure-ftpd Server
### END INIT INFO

RETVAL=0

prog="pure-ftpd"

# Path to the pure-ftp binaries.
fullpath=/usr/local/apps/pureftpd/sbin
pureftpwho=/usr/local/apps/pureftpd/sbin/pure-ftpwho
pure_config=/usr/local/apps/pureftpd/etc/pure-ftpd.conf
pid_file=/var/run/pure-ftpd.pid
pure_launch_script=/usr/local/apps/pureftpd/sbin/pure-config.pl
lockfile=/var/lock/subsys/pure-ftpd

start() {
    echo -n $"Starting $prog: "
	if [ ! -f $pid_file ] ; then
    perl $pure_launch_script $pure_config --daemonize > /dev/null
    RETVAL=$?
        if [ $? = 0 ]; then
            if [ -d /var/lock/subsys ] ; then
                touch $lockfile 
            fi
            touch $pid_file
    		echo "[ OK ]"
        fi
	else
    	echo "$prog already running..."
    fi
    return 0          
}

stop() {
    echo -n $"Stopping $prog: "
    if [ -f $pid_file ] ; then
        PID=`cat $pid_file`
        kill $PID > /dev/null 2>&1
        if [ -f $lockfile ] ; then
			rm -rf $lockfile
		fi        
        sleep 1
        rm -rf $pid_file
        echo "[ OK ]"
    else
        echo "$prog stopped"
    fi
    return 0
}

# See how we were called.
case "$1" in
    start)
            start
            ;;
    stop)
            stop
            ;;
    restart)
            stop
            start
            ;;
    condrestart)
            if [ -f /var/lock/subsys/pure-ftpd ] ; then
                    stop
                    # avoid race
                    sleep 3
                    start
            fi
            ;;
    status) 
		if [ -f $pid_file ] && [ -f $lockfile ] ; then
			PID=`cat $pid_file`
			echo "$prog (pid $PID) is running..."
			if [ -f $pureftpwho ] ; then
				$pureftpwho
			fi
		else
			echo "$prog stopped"
		fi
		;;
    *)
            echo $"Usage: pure-ftpd {start|stop|restart|reload|condrestart|status}"
            RETVAL=1
esac
exit $RETVAL

https://t.me/RX1948 - 2025