summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2008-04-06 11:49:51 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2008-04-06 11:49:51 +0000
commitff16db6c79701129d0666920a5a49b31b17e69af (patch)
tree7f3fe900690d089f71cc9607dc34a6b47bacf99d /generic
parent9def03ea1af0dd88b2bdacedc72e01c3988b16d8 (diff)
downloadptxdist-ff16db6c79701129d0666920a5a49b31b17e69af.tar.gz
ptxdist-ff16db6c79701129d0666920a5a49b31b17e69af.tar.xz
* pure-ftpd: adapt to common style
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7921 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'generic')
-rwxr-xr-xgeneric/etc/init.d/pure-ftpd66
1 files changed, 34 insertions, 32 deletions
diff --git a/generic/etc/init.d/pure-ftpd b/generic/etc/init.d/pure-ftpd
index 86eee36e2..a40a3b17f 100755
--- a/generic/etc/init.d/pure-ftpd
+++ b/generic/etc/init.d/pure-ftpd
@@ -1,13 +1,14 @@
#!/bin/sh
-# Start the proftpd FTP daemon.
-#
+#
+# /etc/init.d/pure-ftpd
+#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
-# Defaults
+# defaults
DAEMON="pure-ftpd"
NAME="pure-ftpd"
-PREFIX="PURE-FTPD: "
+PREFIX="pure-ftpd: "
DAEMON_OPTIONS=""
DAEMON_PIDFILE=/var/run/pure-ftpd.pid
@@ -15,12 +16,12 @@ HELPER="pure-uploadscript"
HELPER_START_SCRIPT=""
HELPER_OPTIONS="-B -u 0 -g 0"
-# Read config (will override defaults)
+# read config (will override defaults)
DEFAULTS="/etc/pure-ftpd.defaults"
-if [ -r $DEFAULTS ]; then
- . $DEFAULTS
+if [ -r $DEFAULTS ]; then
+ . $DEFAULTS
else
- echo "${PREFIX}No $DEFAULTS found."
+ echo "${PREFIX}no $DEFAULTS found."
fi
trap "" 1
@@ -30,13 +31,13 @@ which $DAEMON || { echo "${PREFIX}$DAEMON not found"; exit; }
if [ ! -z $HELPER_START_SCRIPT ] ; then
- DAEMON_OPTIONS="$DAEMON_OPTIONS -o"
-fi
+ DAEMON_OPTIONS="$DAEMON_OPTIONS -o"
+fi
start_helper(){
if [ ! -z $HELPER_START_SCRIPT ]; then
which $HELPER || { echo "${PREFIX}$HELPER not found"; exit; }
- echo "${PREFIX}starting upload helper daemon..."
+ echo "${PREFIX}starting upload helper daemon..."
$HELPER $HELPER_OPTIONS -r $HELPER_START_SCRIPT
else
echo "${PREFIX}no upload script defined, skipping"
@@ -53,34 +54,34 @@ start_daemon(){
}
stop_daemon(){
-if [ -e "$DAEMON_PIDFILE" ]; then
- kill `cat $DAEMON_PIDFILE`
- case $? in
- 0)
- echo "${PREFIX}$NAME stopped"
- ;;
- *)
- kill -9 `cat $DAEMON_PIDFILE`
- echo "${PREFIX}failed to stop $NAME - process killed"
- ;;
- esac
- rm -f $DAEMON_PIDFILE
- echo "${PREFIX}pidfile removed"
-else
- echo "${PREFIX}pid file not found - process not running"
-fi
+ if [ -e "$DAEMON_PIDFILE" ]; then
+ kill `cat $DAEMON_PIDFILE`
+ case $? in
+ 0)
+ echo "${PREFIX}$NAME stopped"
+ ;;
+ *)
+ kill -9 `cat $DAEMON_PIDFILE`
+ echo "${PREFIX}failed to stop $NAME - process killed"
+ ;;
+ esac
+ rm -f $DAEMON_PIDFILE
+ echo "${PREFIX}pidfile removed"
+ else
+ echo "${PREFIX}pid file not found - process not running"
+ fi
}
start(){
- start_daemon
- start_helper
+ start_daemon
+ start_helper
}
stop(){
stop_daemon
stop_helper
}
-
+
case "$1" in
start)
echo -n "${PREFIX}Starting $NAME: "
@@ -96,11 +97,11 @@ case "$1" in
reload)
echo -n "${PREFIX}Reloading $NAME configuration..."
- if [ -e "$DAEMON_PIDFILE" ]; then
+ if [ -e "$DAEMON_PIDFILE" ]; then
kill -HUP `cat $DAEMON_PIDFILE`
echo " done."
else
- echo "pid file not found - process not running"
+ echo "pid file not found - process not running"
fi
;;
@@ -121,3 +122,4 @@ case "$1" in
esac
exit 0
+