projects
/
archlinuxppc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
packages needed by darcs
[archlinuxppc.git]
/
inetutils
/
ftpd.rc
1
#!/bin/bash
2
3
. /etc/rc.conf
4
. /etc/rc.d/functions
5
. /etc/conf.d/ftpd
6
7
PID=$(pidof -o %PPID /usr/sbin/ftpd)
8
case "$1" in
9
start)
10
stat_busy "Starting ftpd"
11
[ -z "$PID" ] && /usr/sbin/ftpd -D $FTPD_ARGS
12
if [ $? -gt 0 ]; then
13
stat_fail
14
else
15
add_daemon ftpd
16
stat_done
17
fi
18
;;
19
stop)
20
stat_busy "Stopping ftpd"
21
[ ! -z "$PID" ] && kill $PID &> /dev/null
22
if [ $? -gt 0 ]; then
23
stat_fail
24
else
25
rm_daemon ftpd
26
stat_done
27
fi
28
;;
29
restart)
30
$0 stop
31
sleep 1
32
$0 start
33
;;
34
*)
35
echo "usage: $0 {start|stop|restart}"
36
esac
37
exit 0