From: ML on
Hello,

currently dkimproxy rc scripts don’t handle the status rc command

my hack is the following ("old school" script, I don’t know enough
about rc command deeps to make things nicer)

# at the end of rc.d/dkimproxy_out replace

run_rc_command "$1"

# by the following

case $1 in
status)
if /usr/bin/pgrep -F "${dkimproxy_out_pidfile}" > /
dev/null 2>&1; then
echo "${name} is running"
exit 0;
else
echo "${name} is not running"
exit 1
fi
;;
*)
run_rc_command "$1"
;;
esac


Hope this help._______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: RW on
On Sun, 11 Oct 2009 15:02:18 +0200
ML <ml(a)sd2i.com> wrote:

> Hello,
>
> currently dkimproxy rc scripts don�t handle the status rc command
>

Status doesn't usually need any special handling unless it's something
a little more exotic like multiple daemons; it should "just work",
provided run_rc_command can find the pidfile.

I'm not familiar with dkimproxy, but based on your script below my guess
is that the variable dkimproxy_out_pidfile should simply be renamed to
pidfile.

> my hack is the following ("old school" script, I don�t know enough
> about rc command deeps to make things nicer)
>
> # at the end of rc.d/dkimproxy_out replace
>
> run_rc_command "$1"
>
> # by the following
>
> case $1 in
> status)
> if /usr/bin/pgrep -F
> "${dkimproxy_out_pidfile}" > / dev/null 2>&1; then
> echo "${name} is running"
> exit 0;
> else
> echo "${name} is not running"
> exit 1
> fi
> ;;
> *)
> run_rc_command "$1"
> ;;
> esac
>
>
> Hope this help._______________________________________________
> freebsd-ports(a)freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to
> "freebsd-ports-unsubscribe(a)freebsd.org"
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"