> > > I ran sudo systemsettings to add, > > > > > sh "/home/roy/Documents/Scripts/service logitechmediaserver > > > > restart.sh"> > > > as a System Cron in Task Manager to run at boot. Here is the script > it points to, > > > > > sleep 40 > /dev/null > > service logitechmediaserver restart > /dev/null> > > > Regards Roy Leith
I should have pointed out that you have to install the KDE cron front-end in order to see the task manager in system settings. Also, you need to make the script file run as root. You might like to try this improved script. > while (( ! ifconfig wlan0 | grep -q 'inet addr:192.168.1.' )) > do > sleep 3 > done > service logitechmediaserver restart > /dev/null Every 3 seconds it checks the wireless interface for a connection by running the ifconfig command and checking for the text 'inet addr:192.168.1.'. If the network connection is not up, the -q option makes grep return the 'not found' value of '1' and the while loop goes to sleep for three seconds and then has another go. Once the network interface is up and running, ifconfig returns the IP address and grep returns a '0' to indicate it has found the text. The script goes on to restart the server. Regards Roy Leith -- Roy Leith ------------------------------------------------------------------------ Roy Leith's Profile: http://forums.slimdevices.com/member.php?userid=35534 View this thread: http://forums.slimdevices.com/showthread.php?t=80714 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
