Skip to content

Instantly share code, notes, and snippets.

@vagnerd
Created March 30, 2023 16:55
Show Gist options
  • Save vagnerd/309c6f5673b98f4af80946952698dfdc to your computer and use it in GitHub Desktop.
Save vagnerd/309c6f5673b98f4af80946952698dfdc to your computer and use it in GitHub Desktop.
update-route-with-gist
#!/bin/bash
while [ 0 ]; do
wget -q https://gist.githubusercontent.com/vagnerd/XXX/raw/YYY/ips -O /tmp/ips
cat /tmp/ips | awk '{ print "route add " $1 " gw X.X.X.X"}' > /tmp/ips.sh
sh /tmp/ips.sh
sleep 3600
done
### rc-local
## https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/
#
#nohup /root/update-route-with-gist.sh &
#exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment