Last active
June 26, 2019 11:47
-
-
Save juagargi/f5cb18e3829a1f48031d62096c6d0a71 to your computer and use it in GitHub Desktop.
get latest scionlab config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "We will get the AS configuration from the Coordinator now." | |
wget "https://raw.githubusercontent.com/netsec-ethz/scionlab/master/scionlab/hostfiles/scionlab-config" -O /tmp/scionlab-config | |
chmod +x /tmp/scionlab-config | |
cd "$SC" | |
rm -f gen-cache/* | |
if [ -f "gen/account_id" ]; then | |
# Use old account-id/account-secret files to generate host-id/host-secret as imported into new scionlab-coordinator. | |
ia=$(<gen/ia) | |
as_id=${ia#*-} | |
account_id=$(<gen/account_id) | |
host_id=`echo -n $account_id$as_id | md5sum | cut -c 1-32` | |
host_secret=$(<gen/account_secret) | |
/tmp/scionlab-config --host-id="$host_id" --host-secret="$host_secret" | |
else | |
/tmp/scionlab-config | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment