freebsd-ports/comms/smstools/files/smsd.sh.in
Erwin Lansing a5ae652049 Update to 2.0.7
PR:		96256
Submitted by:	Fredrik Lindberg <fli@shapeshifter.se>
Approved by:	maintainer
2006-04-25 11:35:33 +00:00

32 lines
525 B
Bash

#!/bin/sh
#
# PROVIDE: smsd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable smsd:
#
# smsd_enable="YES"
#
smsd_enable=${smsd_enable-"NO"}
. %%RC_SUBR%%
name="smsd"
rcvar=`set_rcvar`
load_rc_config $name
pidfile="/var/run/smsd.pid"
command="%%PREFIX%%/bin/smsd"
command_args='&'
# Unfortunally we need to this because as the program won't
# exit cleanly and the terminal will be stuck forever in waitpid.
case "$1" in
stop)
pkill smsd
;;
*)
run_rc_command "$1"
;;
esac