Signed-off-by: Thilo Fromm <thilo.fromm@profitbricks.com>
}
# ----
+cleanup() {
+ local srv="$1"
+
+ # remove installer key from list of root authorized keys
+ rexec "$srv" "sed 's/.*\ storageautoinstaller@host/# ...key removed by auto-deploy script./' /root/.ssh/authorized_keys" \
+ || { log " ERROR removing installer ssh key from storage server $srv."
+ log " ####### MANUAL ATTENTION REQUIRED #######"
+ return 1}
+
+ return 0
+
+}
+# ----
rexec() {
local srv="$1" ; shift
rexec "$storage_ip" "reboot" || return 1
wait_for_reboot 600 $storage_ip || { log " ABORT"; return 1; }
+ cleanup || return 1
+
log " S U C C E S S"
log " Your storage server is now available at $storage_ip."
}