#!/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