From c0ea8c2808171d1edce44a80a56d35f51342dcb7 Mon Sep 17 00:00:00 2001 From: buanet Date: Thu, 14 Dec 2023 17:17:49 +0100 Subject: [PATCH] first test of gui for maintenance script --- debian12/scripts/maintenance_gui.sh | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 debian12/scripts/maintenance_gui.sh diff --git a/debian12/scripts/maintenance_gui.sh b/debian12/scripts/maintenance_gui.sh new file mode 100644 index 0000000..4f648d1 --- /dev/null +++ b/debian12/scripts/maintenance_gui.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +welcome () { + whiptail --title "ioBroker Docker Container Maintenance Script" --ok-button "OK" --msgbox " \ +╔═══════════════════════════════════════════════════════════════════════╗\ +\n ║ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ███████╗ ██████╗ ║\ +\n ║ ██║ ██╔═══██╗ ██╔══██╗ ██╔══██╗ ██╔═══██╗ ██║ ██╔╝ ██╔════╝ ██╔══██╗ ║\ +\n ║ ██║ ██║ ██║ ██████╔╝ ██████╔╝ ██║ ██║ █████╔╝ █████╗ ██████╔╝ ║\ +\n ║ ██║ ██║ ██║ ██╔══██╗ ██╔══██╗ ██║ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗ ║\ +\n ║ ██║ ╚██████╔╝ ██████╔╝ ██║ ██║ ╚██████╔╝ ██║ ██╗ ███████╗ ██║ ██║ ║\ +\n ║ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ║\ +\n ╚═══════════════════════════════════════════════════════════════════════╝\ +\n This script will help you to maintain your ioBroker Docker container!\ +\n" 19 79 +} + +if welcome; then + TO_RUN=$(whiptail --title "ioBroker Docker Container Maintenance Script" --menu "What do you want to do?" 25 78 5 \ + "maintenance" "Turn Maintenance Mode on or off" \ + "upgrade" "Upgrade js-controller" \ + "restore" "Restore ioBroker from backup" 3>&1 1>&2 2>&3) +else + exit 0 +fi + +if [[ $TO_RUN = "maintenance" ]]; then + echo "You selected maintenance" +elif [[ $TO_RUN = "upgrade" ]]; then + echo "You selected upgrade" +elif [[ $TO_RUN = "restore" ]]; then + echo "You selected restore" +fi