i made soft links in /usr/sbin
/usr/bin
but again the same error persists.
service httpd status
env: /etc/init.d/httpd: No such file or directory
[root@mail sbin]# /etc/rc.d/init.d/httpd status
: bad interpreter: No such file or directory
here is my whole script
#!/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
----- Original Message -----
From: "Abhi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 3:29 PM
Subject: Re: [LIH]how to start apache
|
| > > /etc/rc.d/init.d/httpd start
| > > /etc/rc.d/init.d/httpd: set: unknown option:
| > > : command not foundtpd:
| >
| > umm, what shell are you using?
|
| *sigh*
| problem is not of shell.
|
| If he is getting this far, it is working all right.
| Except that service command relies on finding the binaries in /usr/bin,
| /usr/sbin etc.
| It does not accepts locations.
|
| He has to change the script back to what is given on the webpage and
create
| a symbolic link to his own binary in /usr/sbin after deleting or renaming
| the original httpd binary existing(if any) in /usr/sbin.
|
| Regards,
| Abhi
|
|
| _______________________________________________________________
|
| 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
_______________________________________________________________
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