• Re: Log Down

    From ALB@alb@lupinedb.org to alt.computer.workshop,alt.locksmithing on Sat Oct 11 15:47:43 2025
    From Newsgroup: alt.locksmithing

    On 11 Oct 2025 18:55:43 GMT, Brock McNuggets wrote:

    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.

    I don't care about tech that YOU pretend to be interested in just so that
    you can start up another one of your mega trolls.
    Take your attention seeking elsewhere.
    --- Synchronet 3.21a-Linux NewsLink 1.2