~duncan-bayne/halp

f89999e24673892ef0f31208496272f07dc24e21 — Duncan Bayne 6 months ago 092f763
Fix halp rc.d script

+ Ensure the cwd is set correctly.
+ Log output using daemon.
1 files changed, 6 insertions(+), 4 deletions(-)

M freebsd/halp
M freebsd/halp => freebsd/halp +6 -4
@@ 12,18 12,20 @@
name="halp"
desc="Perl scripts to run my personal Gemlog and my professional Website"
rcvar="halp_enable"
command="/usr/local/share/halp/halp.pl"
command_args="--config-filename /usr/local/etc/halp/halp-config.pl"
halp_user="daemon"
command="/usr/local/bin/perl"
command_args="halp.pl --config-filename /usr/local/etc/halp/halp-config.pl --web"
halp_user="root"
pidfile="/var/run/${name}.pid"
required_files="/usr/local/etc/halp/halp-config.pl"
logfile="/var/log/halp/halp.log"

start_cmd="halp_start"
stop_cmd="halp_stop"
status_cmd="halp_status"

halp_start() {
	/usr/sbin/daemon -P ${pidfile} -r -f -u $halp_user $command $command_args
	cd /usr/local/share/halp
	/usr/sbin/daemon -P ${pidfile} -o $logfile -r -f -u $halp_user $command $command_args
}

halp_stop() {