wok annotate pure-ftpd/stuff/pure-ftpd @ rev 22539

updated bird (2.0.3 -> 2.0.7)
author Hans-G?nter Theisgen
date Fri Jan 03 16:08:36 2020 +0100 (2020-01-03)
parents ef32c7a2afe4
children
rev   line source
erjo@755 1 #!/bin/sh
al@19159 2 # /etc/init.d/pure-ftpd : Start, stop and restart pure-FTPd daemon on SliTaz, at
erjo@755 3 # boot time or with the command line.
erjo@755 4 #
erjo@755 5 # To start pure-FTPd server at boot time, just put pure-ftpd in the $RUN_DAEMONS
erjo@755 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
erjo@755 7 #
erjo@755 8 . /etc/init.d/rc.functions
erjo@755 9 . /etc/daemons.conf
erjo@755 10
erjo@755 11 NAME=pure-ftpd
al@19159 12 DESC="$(_ 'pure-FTPd Server Daemon')"
erjo@755 13 DAEMON=/usr/sbin/$NAME
erjo@755 14
erjo@755 15 PIDFILE=/var/run/$NAME.pid
erjo@755 16
erjo@755 17 # Options:
erjo@755 18 # -4 IPV4 Only
erjo@755 19 # -H Don't resolve
erjo@755 20 # -A Chroot Everyone
erjo@755 21 # -B Daemonize
erjo@755 22 OPTIONS="-4 -H -A -B"
erjo@755 23
erjo@755 24 case "$1" in
erjo@755 25 start)
pascal@2403 26 if active_pidfile $PIDFILE $NAME ; then
al@19159 27 _ '%s is already running.'
erjo@755 28 exit 1
erjo@755 29 fi
al@19159 30 action 'Starting %s: %s...' "$DESC" $NAME
erjo@755 31 $DAEMON $OPTIONS
erjo@755 32 status
erjo@755 33 ;;
erjo@755 34 stop)
pascal@2403 35 if ! active_pidfile $PIDFILE $NAME ; then
al@19159 36 _ '%s is not running.' $NAME
erjo@755 37 exit 1
erjo@755 38 fi
al@19159 39 action 'Stopping %s: %s...' "$DESC" $NAME
al@19159 40 kill $(cat $PIDFILE)
erjo@755 41 status
erjo@755 42 ;;
erjo@755 43 restart)
pascal@2403 44 if ! active_pidfile $PIDFILE $NAME ; then
al@19159 45 _ '%s is not running.'
erjo@755 46 exit 1
erjo@755 47 fi
al@19159 48 action 'Restarting %s: %s...' "$DESC" $NAME
al@19159 49 kill $(cat $PIDFILE)
erjo@755 50 sleep 2
erjo@755 51 $DAEMON $OPTIONS
erjo@755 52 status
erjo@755 53 ;;
erjo@755 54 *)
al@19159 55 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
al@19159 56 newline
erjo@755 57 exit 1
erjo@755 58 ;;
erjo@755 59 esac
erjo@755 60
erjo@755 61 exit 0