Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SL Online Alarm - Linux Shell Script

Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
09-13-2006 17:27
Bored. Waiting for SL to get back online since my client crashed (grrr!) and tired of hitting my browser's refresh button. Here's a little Linux shell script to do it automatically and set off a repeating audio alarm when SL comes online (kill the script to turn off the alarm; CTRL-C should work fine if running from a shell). It should be easy to port to your system (though I'm not too sure on command-line audio players in Windows; wget IS available), so have fun (i.e. don't ask me to do it for you :p ).
CODE
#!/bin/bash

while true
do
if ! wget -O - http://secondlife.com/status/ 2>/dev/null | grep -iq 'offline'
then
break
fi
echo 'SL still offline'
sleep 300
done

echo 'SL Online!'
while true
do
play /usr/share/sounds/KDE_Notify.wav 2>/dev/null
sleep 5
done
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
09-13-2006 17:58
Perhaps a 5 minute delay might be kinder to LL's servers...
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
09-13-2006 19:40
Probably, but I was impatient and wanted to make sure it was doing something. Besides, I was seemingly being overly optimistic (I ran it for about a half-hour after noon and again after my client crashed and logins were disabled, then I decided to go do other things and not worry about it).

Feel free to change 'sleep 20' to 'sleep 300' to be kind to your fellow residents. Much appreciated. Oh heck, I'll even edit the original post for ya.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
09-14-2006 10:05
No we know why the rest of us cant log in...... :)

Can you rewrite it so it detects when a STABLE version of SL is up???
Tuach Noh
Ignorant Knowlessman
Join date: 2 Aug 2006
Posts: 79
09-15-2006 17:41
Here you go, Newgate.

CODE
#!/bin/bash

while true
do
echo 'SL still unstable!'
sleep 300
done

echo 'SL Stable!'
while true
do
play /usr/share/sounds/KDE_Notify.wav 2>/dev/null
sleep 5
done


Glad I could help!
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
09-15-2006 23:14
Ha!
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
09-17-2006 10:47
From: Tuach Noh
Here you go, Newgate.

Glad I could help!



hehehe