Starting application on boot
I have Ubuntu 10.10 installed on my pc with XBMC installed. It's set to boot into xbmc on start up and works fine. I also have squeezebox server (a music server for my network) installed and again don't have any trouble. I'd now like to get squeezeslave running, a client for squeezebox server so I added the following lines to /etc/init.d/local:
#!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin squeezeslave -o0 -r3 192.168.1.3 & exit 0 This fails to start the client on boot, however if I ssh into the machine and run /etc/init.d/local it runs fine. Any idea what I'm doing wrong? |
Hi,try
1. add to /etc/init.d/myscript 2. update-rc.d myscript 3. chmod -x myscript |
Remove the PATH line and add an absolute path to the squeezeslave executable e.g.
/usr/bin/squeezeslave -o0 -r3 192.168.1.3 & Note: Check the absolute path with 'which squeezeslave' The program is probably failing to start because is not in the path when /etc/init.d/local is run at boot, but when you ssh in, the program is now in the path. |
Quote:
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin and try to run your program |
All times are GMT -5. The time now is 01:22 AM. |