3.elvin_gateway.sh.in 584 Bytes
Newer Older
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 26 27
#! /bin/sh
#
# PROVIDE: elvin_gateway
# REQUIRE: pubsub
#

case $1 in
start|faststart)
    if test -x /usr/local/libexec/elvin_gateway; then
	if [ -x @prefix@/sbin/daemon_wrapper ]; then
	    echo -n " elvin_gateway wrapper"
	    @prefix@/sbin/daemon_wrapper -l @prefix@/log/elvin_gateway.log \
		/usr/local/libexec/elvin_gateway -d
	else
	    echo -n " elvin_gateway"
	    /usr/local/libexec/elvin_gateway
	fi
    fi
    ;;
stop)
    if [ -r /var/run/elvin_gateway_wrapper.pid ]; then
	kill `cat /var/run/elvin_gateway_wrapper.pid`
    else
	killall elvin_gateway
    fi
    ;;
esac