2010-02-06, 21:33
Hi,
I'm trying to create a very simple startup script which should wake/startup my fileserver. I've created a file saved it in /etc/init.d and made it excecutable.
After that I made the script launched at startup.
The script works when launched manually. But it won't start my server when starting up xbmc. It will start my server when halting xbmc
These are the steps..
Install wakeonlan package
Change to the startup script directory and start editing a new file:
Enter these lines and save file..
Set the permissions of the file:
Make the script run on startup:
Now we finish by running it, and making sure there are no errors.
Reboot to test the script..
Testing the script starts the server and print this output:
root@dhcppc8:/etc/init.d# /etc/init.d/wakeonlansrv
Sending magic packet to 255.255.255.255:9 with 00:00:00:00:00:00
root@dhcppc8:/etc/init.d#
Is there a logfile (init.d) which will log any startup errors or do I mis something? please advise
I'm trying to create a very simple startup script which should wake/startup my fileserver. I've created a file saved it in /etc/init.d and made it excecutable.
After that I made the script launched at startup.
The script works when launched manually. But it won't start my server when starting up xbmc. It will start my server when halting xbmc
These are the steps..
PHP Code:
sudo -i
Install wakeonlan package
PHP Code:
apt-get install wakeonlan
Change to the startup script directory and start editing a new file:
PHP Code:
cd /etc/init.d/
PHP Code:
nano wakeonlansrv
Enter these lines and save file..
PHP Code:
#!/bin/bash
wakeonlan 00:00:00:00:00:00
Set the permissions of the file:
PHP Code:
chmod +x /etc/init.d/wakeonlansrv
Make the script run on startup:
PHP Code:
update-rc.d -n wakeonlansrv defaults
Now we finish by running it, and making sure there are no errors.
PHP Code:
/etc/init.d/wakeonlansrv
Reboot to test the script..
PHP Code:
reboot
Testing the script starts the server and print this output:
root@dhcppc8:/etc/init.d# /etc/init.d/wakeonlansrv
Sending magic packet to 255.255.255.255:9 with 00:00:00:00:00:00
root@dhcppc8:/etc/init.d#
Is there a logfile (init.d) which will log any startup errors or do I mis something? please advise