writting a script for Fedora Core/Redhat's '/etc/init.d'

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Sep 14 17:07:00 UTC 2005


Hi all,

   I've been over on Debian for a while so I guess I've slipped on my 
Redhat-isms. :p

   I've integrated a modified version of the Boa web server into my 
program (which is installed with the main installer automatically). On 
Debian systems it works perfectly. It also works great on Redhat-like 
systems (I'm testing on FC3) except for the init script.

   I've figured out that Redhat calls '. /etc/rc.d/init.d/functions' and 
then the program's script is suppost to call 'daemon <apt-name>' to 
start it when 'services <apt-name> start' is called.

   My problem though is that I am getting the error:

Starting tb_httpd: execvp: No such file or directory

   When I try to start the server. I am guessing that something is 
looking somewhere for 'Boa' though I don't understand how this works 
well enough to dig through it yet.

Boa came with a sample redhat init script in the source 'contrib' 
directory which I modified only by changing the instances of 'boa' to 
'tb_httpd' (which is the name of the binary and is done to avoid 
stepping on an existing boa install). The script is:


#!/bin/sh
# The following two lines enable chkconfig(1) to manipulate this script
# chkconfig: 345 87 13
# description: Boa is a World Wide Web server.  It is used to serve
#              HTML files and CGI.
# processname: tb_httpd
# config: /etc/tb_httpd.conf
#  There is no pid file
#
# Modified by Madison Kelly (digimer-agcygxvf9jodnm+yROfE0A at public.gmane.org) for use in TLE-BU
#

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
   start)
	echo -n "Starting tb_httpd: "
	daemon tb_httpd
	touch /var/lock/subsys/boa
	echo
	;;
   stop)
	echo -n "Shutting down tb_httpd: "
	killproc tb_httpd
	echo
	rm -f /var/lock/subsys/boa
	rm -f /var/run/boa.pid
	;;
   status)
	status tb_httpd
	;;
   restart)
	$0 stop
	$0 start
	;;
   reload)
	echo -n "Reloading tb_httpd: "
	killproc tb_httpd -HUP
	echo
	;;
   *)
	echo "Usage: $0 {start|stop|restart|reload|status}"
	exit 1
esac


   Could anyone shed some light on this? Even just a pointer to a readme 
would be great... my Google searches aren't being to helpful.

   Thanks!

Madison
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list