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> &lt;<a href="mailto:myep@remotelink.com">myep@remotelink.com</a>&gt; 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>&gt;On Wed, 2005-10-12 at 15:36 +0200, Søren Neigaard wrote:<br>&gt;<br>&gt;<br>&gt;&gt;Somehow my /etc/init.d/httpd script broke (i did not alter it), and i<br>&gt;&gt;dont know how to fix it, but i found out that simply running
<br>&gt;&gt;&quot;/usr/sbin/httpd&quot; starts apache, but apachectl does not. So my plan was<br>&gt;&gt;to make a really simple script that runs &quot;/usr/sbin/httpd&quot; like the<br>&gt;&gt;following:<br>&gt;&gt;<br>&gt;&gt;--- SCRIPT ---
<br>&gt;&gt;#!/bin/bash<br>&gt;&gt;<br>&gt;&gt;start() {<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Starting httpd&quot;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/sbin/httpd<br>&gt;&gt;}<br>&gt;&gt;stop() {<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Stopping httpd&quot;
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; killall -9 httpd<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm -f /var/run/httpd.pid /var/lock/subsys/httpd<br>&gt;&gt;}<br>&gt;&gt;<br>&gt;&gt;restart() {<br>&gt;&gt;&nbsp;&nbsp;&nbsp;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bsp;&nbsp;&nbsp; *)<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
echo $&quot;Usage: $0 {start|stop|restart}&quot;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 1<br>&gt;&gt;esac<br>&gt;&gt;<br>&gt;&gt;exit $?<br>&gt;&gt;--- SCRIPT ---<br>&gt;&gt;<br>&gt;&gt;But it gives me this:<br>&gt;&gt;<br>&gt;&gt;: bad interpreter: No such file or directory
<br>&gt;&gt;<br>&gt;&gt;Im no shell programmer, so i have no clue... Any ideas folks?<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;Did you write the script on a windows system, then copy it over to a<br>&gt;linux system (I noticed you are using a Windows email client)? This
<br>&gt;error can be due to problems with carriage return/line feed characters.<br>&gt;<br>&gt;Your script syntax looks fine - this error will be due to the file<br>&gt;format, permissions or the shell environment.<br>&gt;
<br>&gt;BTW - if you broke your apache startup script, just install/re-install<br>&gt;apache to recover it. Easier than trying to reinvent the wheel :)<br>&gt;<br>&gt;Cheers, Ben<br>&gt;<br>&gt;<br>btw, for future script writing you should prob put a sleep 5&nbsp;&nbsp;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>