diff options
author | Volker Stolz <vs@FreeBSD.org> | 2004-05-24 11:46:59 +0000 |
---|---|---|
committer | Volker Stolz <vs@FreeBSD.org> | 2004-05-24 11:46:59 +0000 |
commit | ecf9e6e7c4d759fa3aba93ebb5e5522147566d4a (patch) | |
tree | 7a4d4c5a5993efc8295c13e22d4ba6d9b98bdceb /dns/totd/files | |
parent | Update to 0.78.03 (diff) |
- rcNGify
- Make pkg-deinstall PREFIX-aware while here
PR: ports/67052
Submitted by: ume
Notes
Notes:
svn path=/head/; revision=109858
Diffstat (limited to 'dns/totd/files')
-rw-r--r-- | dns/totd/files/totd.sh | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/dns/totd/files/totd.sh b/dns/totd/files/totd.sh index 9a528db44489..f21da7456630 100644 --- a/dns/totd/files/totd.sh +++ b/dns/totd/files/totd.sh @@ -1,18 +1,37 @@ #!/bin/sh +# +# $FreeBSD$ +# -case "$1" in - start) - if [ -x %PREFIX%/sbin/totd ]; then - %PREFIX%/sbin/totd && echo -n ' totd' - fi - ;; +# PROVIDE: totd +# REQUIRE: SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move totd.sh to /etc/rc.d/totd - stop) - /usr/bin/killall totd && echo -n ' totd' - ;; - - *) - echo "Usage: `basename $0` { start | stop }" - exit 64 - ;; -esac +prefix=%%PREFIX%% + +# Define these totd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/totd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +totd_enable=${totd_enable:-"NO"} # Enable totd +#totd_program="${prefix}/sbin/totd" # Location of totd +totd_flags=${totd_flags:-""} # Flags to totd program + +. %%RC_SUBR%% + +name="totd" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +pidfile="/var/run/${name}.pid" +required_files="${prefix}/etc/${name}.conf" + +load_rc_config $name +run_rc_command "$1" |