Date: Sun, 11 Oct 2009 17:16:23 +0100 From: RW <rwmaillists@googlemail.com> To: ports@freebsd.org Subject: Re: dkimproxy rc script Message-ID: <20091011171623.3708a4dd@gumby.homeunix.com> In-Reply-To: <964AC7D5-8383-4E3E-A36C-6E957AC0B4CA@sd2i.com> References: <964AC7D5-8383-4E3E-A36C-6E957AC0B4CA@sd2i.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 11 Oct 2009 15:02:18 +0200 ML <ml@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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to > "freebsd-ports-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091011171623.3708a4dd>