redesign start

This commit is contained in:
CanbiZ 2025-03-26 14:39:38 +01:00
parent c3caa7b52a
commit 11c9a69af5
2 changed files with 16 additions and 16 deletions

View File

@ -33,6 +33,7 @@ function update_script() {
msg_info "Restarting Gitea" msg_info "Restarting Gitea"
rc-service gitea restart rc-service gitea restart
msg_ok "Restarted Gitea" msg_ok "Restarted Gitea"
exit 0
} }
start start

View File

@ -1356,23 +1356,15 @@ check_container_storage() {
} }
start() { start() {
if [ -f /etc/alpine-release ]; then
echo "Running on Alpine Linux minimal update process."
update_script
exit_script
exit 0
fi
LOGDIR="/usr/local/community-scripts/logs" LOGDIR="/usr/local/community-scripts/logs"
mkdir -p "$LOGDIR" mkdir -p "$LOGDIR"
if command -v pveversion >/dev/null 2>&1; then if command -v pveversion >/dev/null 2>&1; then
if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
clear
exit_script
exit
fi
install_script install_script
else exit 0
fi
if [ -f /etc/debian_version ]; then
CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \
"Support/Update functions for ${APP} LXC. Choose an option:" \ "Support/Update functions for ${APP} LXC. Choose an option:" \
12 60 3 \ 12 60 3 \
@ -1385,23 +1377,30 @@ start() {
VERB="no" VERB="no"
set_std_mode set_std_mode
log_message "INFO" "Update started (Silent Mode)" log_message "INFO" "Update started (Silent Mode)"
update_script
;; ;;
2) 2)
VERB="yes" VERB="yes"
set_std_mode set_std_mode
log_message "INFO" "Update started (Verbose Mode)" log_message "INFO" "Update started (Verbose Mode)"
update_script
;; ;;
3) 3)
clear clear
log_message "INFO" "Update aborted." log_message "INFO" "Update aborted."
exit_script exit_script
exit exit 0
;; ;;
esac esac
SPINNER_PID=""
update_script
fi fi
if [ -f /etc/alpine-release ]; then
echo "Running on Alpine Linux minimal update process."
update_script
exit 0
fi
echo "Unsupported OS detected. Exiting."
exit 1
} }
# This function collects user settings and integrates all the collected information. # This function collects user settings and integrates all the collected information.