equivalent of SuSE's checkproc
Christofer C. Bell
christofer.c.bell at gmail.com
Fri Feb 24 07:20:39 UTC 2006
On 2/22/06, Bob Hartung <rwhart at mchsi.com> wrote:
> Hi all,
> I am trying to modify a SuSE init script to start Tomcat 5.5. It uses
> checkproc which I do not find on the FC4 install. What FC4 program
> provides similiar utility?
I don't know what checkproc does, but I'm assuming it checks to see if
a service is already running. That's provided by the daemon function
in /etc/init.d/functions which is normally sourced by every script in
/etc/init.d.
Note that the following is at the top of every Fedora supplied init script:
# source function library
. /etc/init.d/functions
If you refer to that script, you'll see the following is part of the
daemon() shell function:
# See if it's already running. Look *only* at the pid file.
if [ -f /var/run/${base}.pid ]; then
local line p
read line < /var/run/${base}.pid
for p in $line ; do
[ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p"
done
fi
Anyway, like I said, I'm not sure what checkproc does, but if there's
anything you need to know about Fedora specific enhancements to the
system initialization process, you're likely to find it in
/etc/init.d/function.
Good luck!
--
Chris
"I trust the Democrats to take away my money, which I can afford. I
trust the Republicans to take away my freedom, which I cannot."
More information about the users
mailing list