]> git.pld-linux.org Git - packages/proftpd.git/blame - proftpd.init
- updated to 1.2.10rc3
[packages/proftpd.git] / proftpd.init
CommitLineData
093b00e1
JR
1#!/bin/sh
2#
3# proftpd ProFTPD ftp server
4#
5# chkconfig: 345 85 15
d857a352 6# description: ProFTPD is a highly configurable ftp daemon for unix and unix-like \
093b00e1
JR
7# operating systems.
8# processname: proftpd
9# pidfile: /var/run/proftpd.pid
10# config: /etc/ftpd/proftpd.conf
11
12
13# Source function library
14. /etc/rc.d/init.d/functions
15
16# Get network config
17. /etc/sysconfig/network
18
19# Get service config
20[ -f /etc/sysconfig/proftpd ] && . /etc/sysconfig/proftpd
21
22# Check that networking is up.
133452f3 23if is_yes "${NETWORKING}"; then
db26a22d 24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
133452f3 25 # nls "ERROR: Networking is down. %s can't be run." <service>
26 msg_network_down proftpd
27 exit 1
28 fi
29else
30 exit 0
093b00e1
JR
31fi
32
f27b8a10 33RETVAL=0
093b00e1
JR
34# See how we were called.
35case "$1" in
36 start)
37 # Check if the service is already running?
133452f3 38 if [ ! -f /var/lock/subsys/proftpd ]; then
093b00e1
JR
39 msg_starting ProFTPD
40 daemon proftpd $PROFTPD_OPTS
133452f3 41 RETVAL=$?
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd
093b00e1 43 else
133452f3 44 msg_already_running ProFTPD
093b00e1
JR
45 fi
46 ;;
47 stop)
133452f3 48 # Stop daemons.
093b00e1 49 if [ -f /var/lock/subsys/proftpd ]; then
133452f3 50 msg_stopping ProFTPD
51 killproc proftpd
52 rm -f /var/lock/subsys/proftpd /var/run/proftpd* > /dev/null 2>&1
53 else
ded964d2 54 msg_not_running ProFTPD
093b00e1
JR
55 fi
56 ;;
57 status)
58 status proftpd
59 exit $?
60 ;;
f27b8a10 61 restart|force-reload)
093b00e1
JR
62 $0 stop
63 $0 start
f27b8a10 64 exit $?
093b00e1
JR
65 ;;
66 *)
f27b8a10 67 msg_usage "$0 {start|stop|restart|force-reload|status}"
68 exit 3
093b00e1
JR
69esac
70
71exit $RETVAL
This page took 0.088257 seconds and 4 git commands to generate.