wok annotate proftpd-tls/stuff/proftpd @ rev 25002

updated nrg2iso (0.4 -> 0.4.1)
author Hans-G?nter Theisgen
date Mon May 16 14:45:30 2022 +0100 (2022-05-16)
parents
children
rev   line source
mojo@23842 1 #!/bin/sh
mojo@23842 2 # /etc/init.d/proftpd : Start, stop and restart proftpd daemon on SliTaz, at
mojo@23842 3 # boot time or with the command line.
mojo@23842 4 #
mojo@23842 5 # To start proftpd server at boot time, just put proftpd in the $RUN_DAEMONS
mojo@23842 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
mojo@23842 7 #
mojo@23842 8 . /etc/init.d/rc.functions
mojo@23842 9 . /etc/daemons.conf
mojo@23842 10
mojo@23842 11 NAME=proftpd
mojo@23842 12 DESC="$(_ 'ProFTPd Server Daemon')"
mojo@23842 13 DAEMON=/usr/sbin/$NAME
mojo@23842 14
mojo@23842 15 PIDFILE=/var/run/$NAME.pid
mojo@23842 16
mojo@23842 17 OPTIONS=""
mojo@23842 18
mojo@23842 19 case "$1" in
mojo@23842 20 start)
mojo@23842 21 if active_pidfile $PIDFILE $NAME ; then
mojo@23842 22 _ '%s is already running.'
mojo@23842 23 exit 1
mojo@23842 24 fi
mojo@23842 25 action 'Starting %s: %s...' "$DESC" $NAME
mojo@23842 26 $DAEMON $OPTIONS
mojo@23842 27 status
mojo@23842 28 ;;
mojo@23842 29 stop)
mojo@23842 30 if ! active_pidfile $PIDFILE $NAME ; then
mojo@23842 31 _ '%s is not running.' $NAME
mojo@23842 32 exit 1
mojo@23842 33 fi
mojo@23842 34 action 'Stopping %s: %s...' "$DESC" $NAME
mojo@23842 35 kill $(cat $PIDFILE)
mojo@23842 36 status
mojo@23842 37 ;;
mojo@23842 38 restart)
mojo@23842 39 if ! active_pidfile $PIDFILE $NAME ; then
mojo@23842 40 _ '%s is not running.'
mojo@23842 41 exit 1
mojo@23842 42 fi
mojo@23842 43 action 'Restarting %s: %s...' "$DESC" $NAME
mojo@23842 44 kill $(cat $PIDFILE)
mojo@23842 45 sleep 2
mojo@23842 46 $DAEMON $OPTIONS
mojo@23842 47 status
mojo@23842 48 ;;
mojo@23842 49 *)
mojo@23842 50 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
mojo@23842 51 newline
mojo@23842 52 exit 1
mojo@23842 53 ;;
mojo@23842 54 esac
mojo@23842 55
mojo@23842 56 exit 0