diff options
Diffstat (limited to 'sysutils/gkrellm2')
-rw-r--r-- | sysutils/gkrellm2/Makefile | 11 | ||||
-rw-r--r-- | sysutils/gkrellm2/files/gkrellmd.sh | 46 | ||||
-rw-r--r-- | sysutils/gkrellm2/pkg-plist | 2 |
3 files changed, 38 insertions, 21 deletions
diff --git a/sysutils/gkrellm2/Makefile b/sysutils/gkrellm2/Makefile index a90d17dd318d..438ab60fcc6b 100644 --- a/sysutils/gkrellm2/Makefile +++ b/sysutils/gkrellm2/Makefile @@ -16,6 +16,8 @@ MASTER_SITE_SUBDIR= ume MAINTAINER= ume@FreeBSD.org COMMENT= A GTK based system monitor +USE_RC_SUBR= YES + WRKSRC= ${WRKDIR}/${DISTNAME:C/[a-z]$//} .if defined(GKRELLM_SERVER_ONLY) @@ -62,6 +64,9 @@ CFLAGS+= -DSYSTEM_THEMES_DIR='\"${X11BASE}/share/gkrellm2/themes\"' \ -DSYSTEM_PLUGINS_DIR='\"${X11BASE}/libexec/gkrellm2/plugins\"' \ -DGKRELLMD_SYS_ETC='\"${PREFIX}/etc\"' +RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ + RC_SUBR=${RC_SUBR} + pre-everything:: .if !defined(GKRELLM_SERVER_ONLY) @${ECHO} "" @@ -77,9 +82,9 @@ post-install: @${CHMOD} 2511 ${X11BASE}/bin/gkrellm .endif @${CHMOD} 2511 ${PREFIX}/sbin/gkrellmd - @${SED} -e "s;%%PREFIX%%;${PREFIX};g" \ - ${FILESDIR}/gkrellmd.sh > ${PREFIX}/etc/rc.d/gkrellmd.sh.sample - @${CHMOD} ${BINMODE} ${PREFIX}/etc/rc.d/gkrellmd.sh.sample + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/gkrellmd.sh > ${PREFIX}/etc/rc.d/gkrellmd.sh + @${CHMOD} ${BINMODE} ${PREFIX}/etc/rc.d/gkrellmd.sh ${INSTALL_DATA} ${WRKSRC}/server/gkrellmd.conf \ ${PREFIX}/etc/gkrellmd.conf.sample if [ ! -f ${PREFIX}/etc/gkrellmd.conf ]; then \ diff --git a/sysutils/gkrellm2/files/gkrellmd.sh b/sysutils/gkrellm2/files/gkrellmd.sh index bde345a8d593..b8b1d144324f 100644 --- a/sysutils/gkrellm2/files/gkrellmd.sh +++ b/sysutils/gkrellm2/files/gkrellmd.sh @@ -3,22 +3,34 @@ # Start or stop gkrellmd # $FreeBSD$ -PREFIX=%%PREFIX%% +# PROVIDE: gkrellmd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move imapd.sh to /etc/rc.d/gkrellmd -case "$1" in -start) - if [ -x ${PREFIX}/sbin/gkrellmd -a \ - -f ${PREFIX}/etc/gkrellmd.conf ]; then - ${PREFIX}/sbin/gkrellmd -d - echo -n ' gkrellmd' - fi - ;; -stop) - killall gkrellmd && echo -n ' gkrellmd' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac +prefix=%%PREFIX%% -exit 0 +# Define these imapd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/gkrellmd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +gkrellmd_enable="NO" # Enable gkrellmd +#gkrellmd_program="${prefix}/cyrus/bin/master" # Location of gkrellmd +gkrellmd_flags="-d" # Flags to gkrellmd program + +. %%RC_SUBR%% + +name="gkrellmd" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +required_files="${prefix}/etc/${name}.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/gkrellm2/pkg-plist b/sysutils/gkrellm2/pkg-plist index 9397f55d2314..0ef399247aef 100644 --- a/sysutils/gkrellm2/pkg-plist +++ b/sysutils/gkrellm2/pkg-plist @@ -7,7 +7,7 @@ sbin/gkrellmd @unexec if cmp -s %D/etc/gkrellmd.conf %D/etc/gkrellmd.conf.sample; then rm -f %D/etc/gkrellmd.conf; fi etc/gkrellmd.conf.sample @exec [ -f %B/gkrellmd.conf ] || cp %B/%f %B/gkrellmd.conf -etc/rc.d/gkrellmd.sh.sample +etc/rc.d/gkrellmd.sh %%CLIENT%%@cwd %%X11BASE%% %%CLIENT%%man/man1/gkrellm.1.gz %%CLIENT%%bin/gkrellm |