wok diff pure-ftpd/stuff/pure-ftpd @ rev 1990
Fix: xrick CATEGORY
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Tue Jan 06 23:40:55 2009 +0100 (2009-01-06) |
parents | |
children | ef32c7a2afe4 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pure-ftpd/stuff/pure-ftpd Tue Jan 06 23:40:55 2009 +0100 1.3 @@ -0,0 +1,62 @@ 1.4 +#!/bin/sh 1.5 +# /etc/init.d/pure-ftpd : Start, stop and restart pure-FTPd daemon on SliTaz, at 1.6 +# boot time or with the command line. 1.7 +# 1.8 +# To start pure-FTPd server at boot time, just put pure-ftpd 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=pure-ftpd 1.15 +DESC="pure-FTPd Server Daemon" 1.16 +DAEMON=/usr/sbin/$NAME 1.17 + 1.18 +PIDFILE=/var/run/$NAME.pid 1.19 + 1.20 +# Options: 1.21 +# -4 IPV4 Only 1.22 +# -H Don't resolve 1.23 +# -A Chroot Everyone 1.24 +# -B Daemonize 1.25 +OPTIONS="-4 -H -A -B" 1.26 + 1.27 +case "$1" in 1.28 + start) 1.29 + if [ -f $PIDFILE ] ; then 1.30 + echo "$NAME already running." 1.31 + exit 1 1.32 + fi 1.33 + echo -n "Starting $DESC: $NAME... " 1.34 + $DAEMON $OPTIONS 1.35 + status 1.36 + ;; 1.37 + stop) 1.38 + if [ ! -f $PIDFILE ] ; then 1.39 + echo "$NAME is not running." 1.40 + exit 1 1.41 + fi 1.42 + echo -n "Stopping $DESC: $NAME... " 1.43 + kill `cat $PIDFILE` 1.44 + status 1.45 + ;; 1.46 + restart) 1.47 + if [ ! -f $PIDFILE ] ; then 1.48 + echo "$NAME is not running." 1.49 + exit 1 1.50 + fi 1.51 + echo -n "Restarting $DESC: $NAME... " 1.52 + kill `cat $PIDFILE` 1.53 + sleep 2 1.54 + $DAEMON $OPTIONS 1.55 + status 1.56 + ;; 1.57 + *) 1.58 + echo "" 1.59 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 1.60 + echo "" 1.61 + exit 1 1.62 + ;; 1.63 +esac 1.64 + 1.65 +exit 0