wok-current view pure-ftpd/stuff/pure-ftpd @ rev 21981
updated subversion and subversion-dev (1.9.0 -> 1.12.2)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Oct 12 10:07:49 2019 +0100 (2019-10-12) |
parents | ef32c7a2afe4 |
children |
line source
1 #!/bin/sh
2 # /etc/init.d/pure-ftpd : Start, stop and restart pure-FTPd daemon on SliTaz, at
3 # boot time or with the command line.
4 #
5 # To start pure-FTPd server at boot time, just put pure-ftpd 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=pure-ftpd
12 DESC="$(_ 'pure-FTPd Server Daemon')"
13 DAEMON=/usr/sbin/$NAME
15 PIDFILE=/var/run/$NAME.pid
17 # Options:
18 # -4 IPV4 Only
19 # -H Don't resolve
20 # -A Chroot Everyone
21 # -B Daemonize
22 OPTIONS="-4 -H -A -B"
24 case "$1" in
25 start)
26 if active_pidfile $PIDFILE $NAME ; then
27 _ '%s is already running.'
28 exit 1
29 fi
30 action 'Starting %s: %s...' "$DESC" $NAME
31 $DAEMON $OPTIONS
32 status
33 ;;
34 stop)
35 if ! active_pidfile $PIDFILE $NAME ; then
36 _ '%s is not running.' $NAME
37 exit 1
38 fi
39 action 'Stopping %s: %s...' "$DESC" $NAME
40 kill $(cat $PIDFILE)
41 status
42 ;;
43 restart)
44 if ! active_pidfile $PIDFILE $NAME ; then
45 _ '%s is not running.'
46 exit 1
47 fi
48 action 'Restarting %s: %s...' "$DESC" $NAME
49 kill $(cat $PIDFILE)
50 sleep 2
51 $DAEMON $OPTIONS
52 status
53 ;;
54 *)
55 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
56 newline
57 exit 1
58 ;;
59 esac
61 exit 0