pkgsrc/www/wwwoffle/files/wwwoffled
fredb 9ccd29a8f3 Really respect ${PKG_SYSCONFDIR}, and account for the fact that it may
have moved since the last installation.

Make myself the maintainer of this package.
2002-08-10 17:03:26 +00:00

36 lines
941 B
Bash

#!/bin/sh
#
# $NetBSD: wwwoffled,v 1.4 2002/08/10 17:03:27 fredb Exp $
#
# PROVIDE: wwwoffled
# REQUIRE: DAEMON network
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="wwwoffled"
command="@PREFIX@/sbin/${name}"
control_prog="@PREFIX@/bin/wwwoffle"
command_args="-c @PKG_SYSCONFDIR@/wwwoffle.conf"
required_files="@PKG_SYSCONFDIR@/wwwoffle.conf"
start_cmd=wwwoffled_start
stop_cmd="${control_prog} ${command_args} -kill"
autodial_cmd="${control_prog} -autodial ${command_args}"
offline_cmd="${control_prog} -offline ${command_args}"
online_cmd="${control_prog} -online ${command_args}"
extra_commands="autodial offline online"
wwwoffled_start() {
eval "${command} ${command_args}"
eval "${control_prog} -online ${command_args}"
eval "${control_prog} -fetch ${command_args}"
}
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config $name
run_rc_command "$1"
else
echo -n ' ${name}'
${start_cmd}
fi