Is there a program which sets an alarm off if the internet connection is lost? Some assholes are messing with the switch outside and I want to get them in the act but they are usually doing it when Im sleeping in the early hours.
pic unrelated
Easiest way is probably using http://automateitapp.com/ or tasker
Write a script that tries pining google.com or something every minute. Log it.
>>57306730
I dont have a phone with android.
>>57306741
how do i make an alarm set off when google does't respond also I dont know how to write scripts
>>57306706
What third world shithole do you live in that allows people to fuck with your internet outside?
>>57307085
bulgaria
Dumb ass, slav ass, negra motherfakka, put the switch in a box with a lock!
#!/bin/bash
while true; do
ping -c1 google.com
if [ ! $? == 0 ]; then
ffplay alarm.wav
sleep 10
fi
sleep 5
done
>>57307140
is this in python?
>>57307140
Do I write this in the linux karnel ?
>>57307186
Look at the first line. Duh.
>>57307140
This code on a Netbook or other small laptop hooked up to a pair of speakers will do the trick.
That is, if you know how to run a script...
>>57307186
It's Shell / Bash (Linux)
>>57307186
It's Bash. Bash is like Powershell where it's a scripting language too.
>>57307840
>on a Netbook or other small laptop
even just an rpi nano is more than enough
>>57307205
yes, inside the endosperm.
>>57307900
>(Linux)
GNU, actually. bash is a GNU program
linux typically ships with bash, but it's not linux-specific, even macos ships with bash as well (last i checked)
>>57308112
>linux typically ships with bash
linux distros* i should say
linux alone doesn't ship with bash
>>57306706
...I wonder how they managed to sterilize that substrate...
>>57308475
kek, AMD makes it easy.
Assange pls
Move the switch indoors nigga.
>>57306706
Camp outside with a shotgun full of either rock salt, rubber bullets or glass. Your choice, it won't kill them and teach them the lesson of pain.
set up a bomb that links up to your cable,
once it loses power/signal it blows up
ezpz
>>57307140
Is that lisp?
>>57306706
How the FUCK did that happen?