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