Skip to content

Instantly share code, notes, and snippets.

@yongkangchen
Created June 27, 2023 18:49
Show Gist options
  • Save yongkangchen/bfc7aa4cb875f7c36492c5134a5715b0 to your computer and use it in GitHub Desktop.
Save yongkangchen/bfc7aa4cb875f7c36492c5134a5715b0 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>networkchange</string>
<key>LowPriorityIO</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Users/Shared/bin/networkchange.sh</string>
</array>
<key>WatchPaths</key>
<array>
<string>/private/var/run/resolv.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
@yongkangchen
Copy link
Author

checkSCU.sh

#!/bin/bash

url="https://login.scu.edu"

response=$(curl -sL --head --connect-timeout 3 "$url")

if [[ $? -ne 0 ]]; then
    open "/Users/Shared/bin/ReinstallOnGuardv1.app"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment