Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 43:08:38 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
24 files (29,813K bytes) |
Messages: | 175,377 |
On Oct 11, 2025 at 11:47:51rC>AM MST, "ALB" wrote <w1cb91ygg8sd.179spbd2f65tx$.dlg@40tude.net>:
On 11 Oct 2025 18:45:07 GMT, Brock McNuggets wrote:
On Oct 11, 2025 at 11:15:45rC>AM MST, "Brock McNuggets" wrote
<68ea9ed1$1$4167$882e4bbb@reader.netnews.com>:
I have a script that logs when my network goes down.
---------------------------------------------------------------------- >>>> set wifiName to "[NETWORK NAME]"
set wifiPassword to "[NETWORK PASSWORD]"
set userName to short user name of (system info)
do shell script ("echo '\\nSTARTING DOWN LOG: " & (current date) as string) &
"\\n" & "' >> /Users/" & userName & "/Desktop/down.txt"
repeat
try
set thePing to do shell script "ping -c 1 apple.com || ping -c 1 >>>> bing.com || ping -c 1 google.com"
delay 5
on error
do shell script ("echo '" & (current date) as string) & "' >> /Users/"
& userName & "/Desktop/down.txt"
log "Net Down: " & (current date)
do shell script "networksetup -getinfo Wi-Fi | grep -q Subnet: || >>>> networksetup -setairportnetwork en1 " & wifiName & " " & wifiPassword
delay 10
end try
end repeat
---------------------------------------------------------------------- >>>>
Been using it for years, on a system that I rarely use (hence why logging to
the desktop is fine, even if not what I would usually do).
But I want it to do better. If the Internet is down I want a line in the log
that says:
*** Internet Down: Oct 11 2025 10:44 AM to Oct 11 2025 11:56 AM
Of course with the correct dates / times. Working on it... but curious if one
of the better coders in here can beat me to it. Or does someone have a premade
solution?
OK, with help from ChatGPT I got this:
Nobody gives a flying fuck snit.
Take your trolling elsewhere.
YOU do not care about tech, no matter what sock you use. Sure. Thanks for the admission.