mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
83eb2c3700
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.
47 lines
845 B
Bash
47 lines
845 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: dspam
|
|
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
|
|
# BEFORE: mail
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
|
|
# dspam_enable="YES"
|
|
#
|
|
# dspam_debug="YES" will start dspam with debug logging (you need ar least WITH_DEBUG)
|
|
# you can also set the pid file via dspam_pidfile
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="dspam"
|
|
rcvar=dspam_enable
|
|
|
|
load_rc_config $name
|
|
|
|
#defaults
|
|
: ${dspam_enable="NO"}
|
|
: ${dspam_debug="NO"}
|
|
: ${dspam_pidfile:-/var/run/dspam.pid}
|
|
|
|
command=%%PREFIX%%/bin/${name}
|
|
if checkyesno dspam_debug
|
|
then
|
|
command_args="--daemon --debug > /dev/null 2>&1 &"
|
|
else
|
|
command_args="--daemon > /dev/null 2>&1 &"
|
|
fi
|
|
required_dirs=%%DSPAM_HOME%%
|
|
required_files=%%PREFIX%%/etc/${name}.conf
|
|
|
|
extra_commands=reload
|
|
reload()
|
|
{
|
|
kill -HUP `cat $pidfile`
|
|
}
|
|
|
|
run_rc_command "$1"
|