Skip to content

Instantly share code, notes, and snippets.

@rick
Created November 16, 2023 23:53
Show Gist options
  • Save rick/598fc8add0d3dd97a3a559ab903f19da to your computer and use it in GitHub Desktop.
Save rick/598fc8add0d3dd97a3a559ab903f19da to your computer and use it in GitHub Desktop.
patch bin/backshed to support internal|external
diff --git a/websages/bin/backshed b/websages/bin/backshed
index 773efd6..03cd59d 100755
--- a/websages/bin/backshed
+++ b/websages/bin/backshed
@@ -25,7 +25,18 @@ NAS02="10.253.11.202" # 8-bay synology
NAS03="10.253.11.203" # ReadyNAS Pro
NAS06="10.253.11.200" # synology rs1219+ crate01
-SOEKRIS="162.236.21.179" # hogun, fandral
+if [ $# -ne 1 ]; then
+ echo "usage: $0 <internal|external>"
+ exit 1
+fi
+
+case "$1" in
+ "internal" )
+ SOEKRIS="192.168.1.253";; # internal address for soekris nodes
+ "external" )
+ SOEKRIS="162.236.21.179";; # external CARP address for soekris nodes
+ *) echo >&2 "Invalid option: $@"; exit 1;;
+esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment