summaryrefslogtreecommitdiffstats
path: root/ftp/jftpgw/files/jftpgw.sh.in
blob: 367c08163872c047aea4e89b8e5351ef5a58210f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

PROGRAM=@PREFIX@/sbin/jftpgw
PIDFILE=/var/run/jftpgw.pid

case "$1" in

start)
	if [ -x $PROGRAM ] && [ -r @PREFIX@/etc/jftpgw.conf ]
	then
		$PROGRAM
		echo -n "jftpgw "
	fi
	;;

stop)
	PID=`cat $PIDFILE 2>/dev/null`
	ps -p "$PID" | tail +2 | grep -sqw $PROGRAM && kill $PID
	;;

*)
	echo "usage: $0 start|stop"
	;;
esac

OpenPOWER on IntegriCloud