]> git.pld-linux.org Git - packages/pure-ftpd.git/blame - pure-ftpd.init
- spelling fix, uppercases, etc.
[packages/pure-ftpd.git] / pure-ftpd.init
CommitLineData
e61da7a2
AM
1#!/bin/sh
2#
3# pureftpd PureFTPD server
4#
5# chkconfig: 345 85 15
6# description: PureFTPD is fast, production-quality, standard-conformant FTP server
7#
8
9# Source function library
10. /etc/rc.d/init.d/functions
11
12# Get network config
13. /etc/sysconfig/network
14
15# Get service config
16[ -f /etc/sysconfig/pure-ftpd ] && . /etc/sysconfig/pure-ftpd
17
18# Check that networking is up.
8d60cf00 19if is_yes "${NETWORKING}"; then
8e007219 20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
8d60cf00 21 # nls "ERROR: Networking is down. %s can't be run." <service>
22 msg_network_down pure-ftpd
23 exit 1
24 fi
25else
26 exit 0
e61da7a2
AM
27fi
28
40382493 29RETVAL=0
e61da7a2
AM
30# See how we were called.
31case "$1" in
32 start)
33 # Check if the service is already running?
8d60cf00 34 if [ ! -f /var/lock/subsys/pure-ftpd ]; then
e61da7a2 35 msg_starting pure-ftpd
469b4406 36 rm -f /var/run/pure-ftpd/client*
7ebd288d 37 daemon pure-config.pl /etc/ftpd/pureftpd.conf --daemonize
8d60cf00 38 RETVAL=$?
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pure-ftpd
e61da7a2 40 else
8d60cf00 41 msg_already_running pure-ftpd
e61da7a2
AM
42 fi
43 ;;
44 stop)
8d60cf00 45 # Stop daemons.
e61da7a2 46 if [ -f /var/lock/subsys/pure-ftpd ]; then
8d60cf00 47 msg_stopping pure-ftpd
48 killproc pure-ftpd
49 rm -f /var/lock/subsys/pure-ftpd > /dev/null 2>&1
50 else
51 msg_not_running pure-ftpd
e61da7a2
AM
52 fi
53 ;;
54 status)
55 status pure-ftpd
56 RETVAL=$?
57 if [ $RETVAL -eq 0 ]; then
8d60cf00 58 pure-ftpwho
e61da7a2 59 fi
e61da7a2 60 ;;
40382493 61 restart|force-reload)
e61da7a2
AM
62 $0 stop
63 $0 start
40382493 64 exit $?
e61da7a2
AM
65 ;;
66 *)
40382493 67 msg_usage "$0 {start|stop|restart|force-reload|status}"
68 exit 3
e61da7a2
AM
69 ;;
70esac
71
72exit $RETVAL
This page took 0.304437 seconds and 4 git commands to generate.