mirror of
https://git.freebsd.org/ports.git
synced 2025-06-27 23:50:30 -04:00
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
41 lines
741 B
Bash
41 lines
741 B
Bash
#! /bin/sh
|
|
#
|
|
#
|
|
# PROVIDE: imspd
|
|
# REQUIRE: DAEMON NETWORKING SERVERS
|
|
#
|
|
# Add the following line to /etc/rc.conf to enable imspd:
|
|
#
|
|
# imspd_enable="YES"
|
|
#
|
|
# Tweakable parameters for users to override in rc.conf
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=imspd
|
|
rcvar=imspd_enable
|
|
|
|
load_rc_config ${name}
|
|
: ${imspd_enable="NO"}
|
|
: ${imspd_pidfile=/var/run/imspd.pid}
|
|
: ${imspd_options=/var/imspd/options}
|
|
|
|
pidfile=${imspd_pidfile}
|
|
start_postcmd="start_postcmd"
|
|
stop_postcmd="stop_postcmd"
|
|
required_files=${imspd_options}
|
|
command="%%PREFIX%%/sbin/imspd"
|
|
command_args=">/dev/null &"
|
|
|
|
start_postcmd()
|
|
{
|
|
PID=`pgrep imspd`
|
|
[ -n "${PID}" ] && echo ${PID} > ${pidfile}
|
|
}
|
|
|
|
stop_postcmd()
|
|
{
|
|
[ -f "${pidfile}" ] && rm ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|