]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/proftpd/S50proftpd
proftpd: don't test if the binary exists in the init script
[coffee/buildroot.git] / package / proftpd / S50proftpd
1 #!/bin/sh
2
3 trap "" HUP
4 trap "" TERM
5 [ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
6 [ ! -f /var/log/wtmp ] && touch /var/log/wtmp
7
8 start() {
9         printf "Starting ProFTPD: "
10         /usr/sbin/proftpd
11         if [ $? != 0 ]; then
12                 echo "FAILED"
13                 exit 1
14         else
15                 echo "done"
16         fi
17 }
18
19 stop() {
20         printf "Stopping ProFTPD: "
21         killall proftpd
22         echo "done"
23 }
24
25 case "$1" in
26     start)
27         start
28         ;;
29
30     stop)
31         stop
32         ;;
33
34     restart)
35         stop
36         start
37         ;;
38
39     *)
40         echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
41         exit 1
42         ;;
43 esac
44
45 exit 0