From c8036796101fd77e89da7a87bd220ff56093efe7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 14 Jun 2020 22:54:40 +0200 Subject: [PATCH] ++viirb cleanup --- viirb-cleanup-final-stage.sh | 18 +++++++++++++++--- viirb-configure-vpnendpoint.sh | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/viirb-cleanup-final-stage.sh b/viirb-cleanup-final-stage.sh index ee7c0f6..a9a116a 100755 --- a/viirb-cleanup-final-stage.sh +++ b/viirb-cleanup-final-stage.sh @@ -5,9 +5,23 @@ set -e set -x +if [ $# -ne 2 ]; then + echo "$0 viirb-ip-address viirb-id" + echo " viirb-ip-address: where to find the viirb" + echo " viirb-id: number in decimal format" + exit 1 +fi + viirb_ip=$1; shift + +id=$1; shift +viirb_hostname=viirb${id} + root_password=$(pwgen -1 32) +# Save for sending to user +# FIXME: future make this more easy / better to transfer +echo $root_password > ${viirb_hostname}.rootpw cat <