Try dos2unix to convert the file from a Windows formt to a UNIX format.<br>
<br>
I agree with the above about getting the offical copy of the inet script for Apache.<br>
<br>
- Jamie<br><br><div><span class="gmail_quote">On 10/12/05, <b class="gmail_sendername">Michael Yep</b> <<a href="mailto:myep@remotelink.com">myep@remotelink.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Ben Stringer wrote:<br><br>>On Wed, 2005-10-12 at 15:36 +0200, Søren Neigaard wrote:<br>><br>><br>>>Somehow my /etc/init.d/httpd script broke (i did not alter it), and i<br>>>dont know how to fix it, but i found out that simply running
<br>>>"/usr/sbin/httpd" starts apache, but apachectl does not. So my plan was<br>>>to make a really simple script that runs "/usr/sbin/httpd" like the<br>>>following:<br>>><br>>>--- SCRIPT ---
<br>>>#!/bin/bash<br>>><br>>>start() {<br>>>         echo "Starting httpd"<br>>>         /usr/sbin/httpd<br>>>}<br>>>stop() {<br>>>         echo "Stopping httpd"
<br>>>         killall -9 httpd<br>>>         rm -f /var/run/httpd.pid /var/lock/subsys/httpd<br>>>}<br>>><br>>>restart() {<br>>>         stop<br>>>         start<br>>>}<br>
>><br>>>case "$1" in<br>>>         start)<br>>>                 start<br>>>                 ;;<br>>>         stop)<br>>>                 stop<br>>>                 ;;
<br>>>         restart)<br>>>                 restart<br>>>                 ;;<br>>>         *)<br>>>                
echo $"Usage: $0 {start|stop|restart}"<br>>>                 exit 1<br>>>esac<br>>><br>>>exit $?<br>>>--- SCRIPT ---<br>>><br>>>But it gives me this:<br>>><br>>>: bad interpreter: No such file or directory
<br>>><br>>>Im no shell programmer, so i have no clue... Any ideas folks?<br>>><br>>><br>><br>>Did you write the script on a windows system, then copy it over to a<br>>linux system (I noticed you are using a Windows email client)? This
<br>>error can be due to problems with carriage return/line feed characters.<br>><br>>Your script syntax looks fine - this error will be due to the file<br>>format, permissions or the shell environment.<br>>
<br>>BTW - if you broke your apache startup script, just install/re-install<br>>apache to recover it. Easier than trying to reinvent the wheel :)<br>><br>>Cheers, Ben<br>><br>><br>btw, for future script writing you should prob put a sleep 5  between
<br>stop and start to make sure the process is dead<br><br>--<br>Michael Yep<br>Development / Technical Operations<br>RemoteLink, Inc.<br>(630) 983-0072 x164<br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">
fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a><br></blockquote></div><br>