Skip to content

Instantly share code, notes, and snippets.

@elvisciotti
Created November 2, 2024 00:03
Show Gist options
  • Save elvisciotti/1a91f4f1399e93398595719c7157af79 to your computer and use it in GitHub Desktop.
Save elvisciotti/1a91f4f1399e93398595719c7157af79 to your computer and use it in GitHub Desktop.
crontab: private internet access reconnect to dedicated IP during specic time interval
# replace xxx with what you get from "piactl get region"
# every 5 minutes, 9 to 18 mon-fri
*/5 9-18 * * 1-5 [[ $(/usr/local/bin/piactl get region) == "xxxx" ]] || (/usr/local/bin/piactl set region xxxx; /usr/local/bin/piactl connect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment