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.

Revisions

  1. vagnerd created this gist Mar 30, 2023.
    14 changes: 14 additions & 0 deletions update-route-with-gist.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/bin/bash

    while [ 0 ]; do
    wget -q https://gist.github.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