freebsd-ports/comms/smstools3/files/smsd.in
Guido Falsi 86239fe16a - Modify startup script to let smsd change user by itself [1]
- Change the sample configuration file to have same behaviour as
  old startup script did by default

While here:

- Make strip command silent
- Fix some staging glitches
- Use new @sample directive

PR:		191361 [1]
Submitted by:	timp87@gmail.com
2014-06-26 22:28:34 +00:00

28 lines
529 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: smsd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable smsd:
#
# smsd_enable="YES"
#
. /etc/rc.subr
name=smsd
rcvar=smsd_enable
load_rc_config ${name}
: ${smsd_enable:=NO}
: ${smsd_pidfile:="%%PIDDIR%%/smsd.pid"}
: ${smsd_infofile:="%%PIDDIR%%/smsd.working"}
: ${smsd_config:="%%PREFIX%%/etc/smsd.conf"}
pidfile=${smsd_pidfile}
command="%%PREFIX%%/bin/smsd"
command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile}"
run_rc_command "$1"