]> git.pld-linux.org Git - packages/pure-ftpd.git/blobdiff - pure-ftpd.init
- patch for CAP_AUDIT_WRITE added; pam file fixed (/etc/ftpd/ftpusers); rel 2
[packages/pure-ftpd.git] / pure-ftpd.init
index c72bd4e5485acf4e089ca59740a597f0bf9d03bf..b5f6ca7255a8ccd00108a0a8d1d3d0634ddbc108 100644 (file)
@@ -37,15 +37,13 @@ else
        exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/pure-ftpd ]; then
                msg_starting pure-ftpd
                rm -f /var/run/pure-ftpd/client*
                if [ x"$CFG" = "x/usr/sbin/pure-config" ] ; then
+                       modprobe -s capability > /dev/null 2>&1
                        daemon /usr/sbin/pure-ftpd \
                                $(/usr/sbin/pure-config -f /etc/ftpd/pureftpd.conf) \
                                --daemonize
@@ -68,8 +66,9 @@ case "$1" in
        else
                msg_already_running pure-ftpd
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/pure-ftpd ]; then
                if [ -n "$UPLOADSCRIPT" ]; then
@@ -84,6 +83,16 @@ case "$1" in
        else
                msg_not_running pure-ftpd
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status pure-ftpd
@@ -94,9 +103,8 @@ case "$1" in
        fi
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload|status}"
This page took 0.037079 seconds and 4 git commands to generate.