wok diff proftpd-tls/stuff/proftpd @ rev 25153

updated prosody (0.11.5 -> 0.12.1)
author Hans-G?nter Theisgen
date Thu Jun 30 15:07:10 2022 +0100 (24 months ago)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/proftpd-tls/stuff/proftpd	Thu Jun 30 15:07:10 2022 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +#!/bin/sh
     1.5 +# /etc/init.d/proftpd : Start, stop and restart proftpd daemon on SliTaz, at
     1.6 +# boot time or with the command line.
     1.7 +#
     1.8 +# To start proftpd server at boot time, just put proftpd in the $RUN_DAEMONS
     1.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    1.10 +#
    1.11 +. /etc/init.d/rc.functions
    1.12 +. /etc/daemons.conf
    1.13 +
    1.14 +NAME=proftpd
    1.15 +DESC="$(_ 'ProFTPd Server Daemon')"
    1.16 +DAEMON=/usr/sbin/$NAME
    1.17 +
    1.18 +PIDFILE=/var/run/$NAME.pid
    1.19 +
    1.20 +OPTIONS=""
    1.21 +
    1.22 +case "$1" in
    1.23 +  start)
    1.24 +    if active_pidfile $PIDFILE $NAME ; then
    1.25 +      _ '%s is already running.'
    1.26 +      exit 1
    1.27 +    fi
    1.28 +    action 'Starting %s: %s...' "$DESC" $NAME
    1.29 +    $DAEMON $OPTIONS
    1.30 +    status
    1.31 +    ;;
    1.32 +  stop)
    1.33 +    if ! active_pidfile $PIDFILE $NAME ; then
    1.34 +      _ '%s is not running.' $NAME
    1.35 +      exit 1
    1.36 +    fi
    1.37 +    action 'Stopping %s: %s...' "$DESC" $NAME
    1.38 +    kill $(cat $PIDFILE)
    1.39 +    status
    1.40 +    ;;
    1.41 +  restart)
    1.42 +    if ! active_pidfile $PIDFILE $NAME ; then
    1.43 +      _ '%s is not running.'
    1.44 +      exit 1
    1.45 +    fi
    1.46 +    action 'Restarting %s: %s...' "$DESC" $NAME
    1.47 +    kill $(cat $PIDFILE)
    1.48 +    sleep 2
    1.49 +    $DAEMON $OPTIONS
    1.50 +    status
    1.51 +    ;;
    1.52 +  *)
    1.53 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.54 +    newline
    1.55 +    exit 1
    1.56 +    ;;
    1.57 +esac
    1.58 +
    1.59 +exit 0