[ubuntu-uk] Init Script fun
Rob Beard
rob at esdelle.co.uk
Tue Jun 29 22:59:51 BST 2010
On 29/06/10 20:20, Alan Lord (News) wrote:
> On 29/06/10 20:08, Rob Beard wrote:
>> Now running one of these streams is fine, it starts fine and goes into
>> the background. If I run a second stream (basically start the next
>> init.d script) it will start to run the script but then come up with an
>> error about it already running.
>
> PIDs.
>
> The start-stop-daemon should create a pid file so that it knows which
> app to kill. These are usually stored in /var/run/
>
> I'm guessing that you will need to create different PIDs for each
> instance that you are trying to run. Try
>
> # man start-stop-daemon
>
> and take a look at the options.
>
> HTH
>
> Al
>
>
Thanks Al,
I managed to get it working. I had to add the --user and then the
username the process was running under to stop it. Basically it now
starts the process as root, then changes to a different user.
All seems to be working now when I try and start the init script from
root from the shell, so it's getting there.
Now I have to figure out why it won't start at boot (when entering
runlevel 2). I've linked the init.d scripts into files
S20icecast-stream1...2... and so on and even added them to /etc/rc.local
but they're not starting at boot.
Not to worry, I'm making progress. I'm going to call it a night now and
look at it tomorrow after sleeping on it.
Rob
More information about the ubuntu-uk
mailing list