diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index cd2377f7..9db74e64 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index fb6c4924..66efe4b1 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 71266831..16838fb5 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index 9e827139..9b8127f3 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index 587a261b..8dc8f673 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index 999c8e63..6aaf7af4 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 9283f4b6..2a263a79 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index d40b30d8..ce74f19e 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index e1f07047..5e953343 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo