diff options
author | Mark Felder <feld@FreeBSD.org> | 2014-02-10 01:46:33 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2014-02-10 01:46:33 +0000 |
commit | e4e8a4e1537ea21b78a22fd32729f3622b29351d (patch) | |
tree | 72425677aa457c09de98598e50888e0a8d04cb93 /irc/inspircd/files | |
parent | 98b3383194a3d6e0008e231846f524e66e461a67 (diff) | |
download | ports-e4e8a4e1537ea21b78a22fd32729f3622b29351d.tar.gz ports-e4e8a4e1537ea21b78a22fd32729f3622b29351d.zip |
Notes
Diffstat (limited to 'irc/inspircd/files')
-rw-r--r-- | irc/inspircd/files/inspircd.in | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/irc/inspircd/files/inspircd.in b/irc/inspircd/files/inspircd.in index ffc5bccfdcd0..074f9b20e596 100644 --- a/irc/inspircd/files/inspircd.in +++ b/irc/inspircd/files/inspircd.in @@ -38,21 +38,23 @@ load_rc_config ${name} : ${inspircd_logfile="%%INSPIRCD_LOG%%"} : ${inspircd_flags="${inspircd_flags} --logfile ${inspircd_logfile} --config ${inspircd_config}"} -command=%%PREFIX%%/bin/inspircd +command=/usr/sbin/daemon +command_args=" -f %%PREFIX%%/bin/inspircd --nofork ${inspircd_flags}" +procname=%%PREFIX%%/bin/inspircd pidfile=${inspircd_pidfile} required_files=${inspircd_config} start_precmd=inspircd_prestart inspircd_prestart() { - piddir=$(dirname ${inspircd_pidfile}) - if [ ! -d ${piddir} ]; then - install -d -m 755 -o ${inspircd_user} -g ${inspircd_group} ${piddir} - fi - logdir=$(dirname ${inspircd_logfile}) - if [ ! -d ${logdir} ]; then - install -d -m 755 -o ${inspircd_user} -g ${inspircd_group} ${logdir} - fi + # inspircd_flags gets applied too early if we don't do this. + # I didn't want to force people to update their rc.conf files + # and change the inspircd_flags to something else. + rc_flags="" + + for i in ${inspircd_pidfile} ${inspircd_logfile}; do + install -d -m 755 -o ${inspircd_user} -g ${inspircd_group} ${i%/*} + done } run_rc_command "$1" |