On Tue, 21 May 2002, Arvind wrote:
> now if i type in
> `service httpd start`
> env: /etc/init.d/httpd: No such file or directory
you probably don't have /etc/init.d/httpd. This would happen if you
installed apache from source.
Here's my httpd.init:
#!/bin/sh
#
# httpd This shell script takes care of starting and stopping
# httpd.
#
# chkconfig: 2345 90 20
# description: httpd apache webserver
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/local/apache/bin/apachectl ] || exit 0
RETVAL=0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting httpd: "
/usr/local/apache/bin/apachectl start > /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && echo_success || echo_failure
echo
;;
start_ssl)
# Start daemons.
echo -n "Starting httpd: "
/usr/local/apache/bin/apachectl start_ssl > /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && echo_success || echo_failure
echo
;;
stop)
# Stop daemons.
echo -n "Shutting down httpd: "
/usr/local/apache/bin/apachectl stop > /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && echo_success || echo_failure
echo
;;
status)
ps -u root | grep "httpd" > /dev/null \
&& echo "httpd is running." \
|| echo "httpd is not running."
exit $?
;;
restart)
echo -n "Starting httpd: "
/usr/local/apache/bin/apachectl restart > /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && echo_success || echo_failure
echo
;;
*)
echo "Usage: httpd {start|start_ssl|stop|status|restart}"
exit 1
esac
exit $RETVAL
--
Nature, to be commanded, must be obeyed.
-- Francis Bacon
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help