From 6991f3fd976f34c344451ae8df60b12bb66ad971 Mon Sep 17 00:00:00 2001 From: Miguel Muniz Date: Mon, 22 Jul 2024 11:43:06 -0700 Subject: [PATCH] Update Gitea script to display the correct application name and version during the update process --- .history/ct/gitea_20240722114032.sh | 89 +++++++++++++++++++++++++++++ .history/ct/gitea_20240722114043.sh | 89 +++++++++++++++++++++++++++++ .history/ct/gitea_20240722114046.sh | 89 +++++++++++++++++++++++++++++ .history/ct/gitea_20240722114049.sh | 89 +++++++++++++++++++++++++++++ .history/ct/gitea_20240722114237.sh | 89 +++++++++++++++++++++++++++++ .history/ct/gitea_20240722114239.sh | 89 +++++++++++++++++++++++++++++ ct/gitea.sh | 4 +- 7 files changed, 536 insertions(+), 2 deletions(-) create mode 100644 .history/ct/gitea_20240722114032.sh create mode 100644 .history/ct/gitea_20240722114043.sh create mode 100644 .history/ct/gitea_20240722114046.sh create mode 100644 .history/ct/gitea_20240722114049.sh create mode 100644 .history/ct/gitea_20240722114237.sh create mode 100644 .history/ct/gitea_20240722114239.sh diff --git a/.history/ct/gitea_20240722114032.sh b/.history/ct/gitea_20240722114032.sh new file mode 100644 index 00000000..46b687f2 --- /dev/null +++ b/.history/ct/gitea_20240722114032.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ + ______(_)_/ /___ ____ _ + / __ / // __/ _ \/ __ / + / /_/ / // /_/ __/ /_/ / + \__, /_/ \__/\___/\__,_/ +/____/ + + ______ _ __ + / ____/(_)_/ /___ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +VERSION=${RELEASE#v} +msg_info "Updating ${}" +wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/nullexit +msg_ok "Updated ${APP} to ${RELEASE}" +# else +# msg_ok "No update required ${APP} is already at ${RELEASE}" +# fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/.history/ct/gitea_20240722114043.sh b/.history/ct/gitea_20240722114043.sh new file mode 100644 index 00000000..0e0a1403 --- /dev/null +++ b/.history/ct/gitea_20240722114043.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ + ______(_)_/ /___ ____ _ + / __ / // __/ _ \/ __ / + / /_/ / // /_/ __/ /_/ / + \__, /_/ \__/\___/\__,_/ +/____/ + + ______ _ __ + / ____/(_)_/ /___ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +VERSION=${RELEASE#v} +msg_info "Updating gitea" +wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/nullexit +msg_ok "Updated ${APP} to ${RELEASE}" +# else +# msg_ok "No update required ${APP} is already at ${RELEASE}" +# fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/.history/ct/gitea_20240722114046.sh b/.history/ct/gitea_20240722114046.sh new file mode 100644 index 00000000..363c15a2 --- /dev/null +++ b/.history/ct/gitea_20240722114046.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ + ______(_)_/ /___ ____ _ + / __ / // __/ _ \/ __ / + / /_/ / // /_/ __/ /_/ / + \__, /_/ \__/\___/\__,_/ +/____/ + + ______ _ __ + / ____/(_)_/ /___ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +VERSION=${RELEASE#v} +msg_info "Updating gitea " +wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/nullexit +msg_ok "Updated ${APP} to ${RELEASE}" +# else +# msg_ok "No update required ${APP} is already at ${RELEASE}" +# fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/.history/ct/gitea_20240722114049.sh b/.history/ct/gitea_20240722114049.sh new file mode 100644 index 00000000..1b9f7fbe --- /dev/null +++ b/.history/ct/gitea_20240722114049.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ + ______(_)_/ /___ ____ _ + / __ / // __/ _ \/ __ / + / /_/ / // /_/ __/ /_/ / + \__, /_/ \__/\___/\__,_/ +/____/ + + ______ _ __ + / ____/(_)_/ /___ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +VERSION=${RELEASE#v} +msg_info "Updating gitea to ${RELEASE}" +wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/nullexit +msg_ok "Updated ${APP} to ${RELEASE}" +# else +# msg_ok "No update required ${APP} is already at ${RELEASE}" +# fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/.history/ct/gitea_20240722114237.sh b/.history/ct/gitea_20240722114237.sh new file mode 100644 index 00000000..fd15bea4 --- /dev/null +++ b/.history/ct/gitea_20240722114237.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ + ______(_)_/ /___ ____ _ + / __ / // __/ _ \/ __ / + / /_/ / // /_/ __/ /_/ / + \__, /_/ \__/\___/\__,_/ +/____/ + + ______ _ __ + / ____/(_)_/ /___ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +VERSION=${RELEASE#v} +msg_info "Updating gitea to ${RELEASE}" +wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/nullexit +msg_ok "Updated Gitea to ${RELEASE}" +# else +# msg_ok "No update required ${APP} is already at ${RELEASE}" +# fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/.history/ct/gitea_20240722114239.sh b/.history/ct/gitea_20240722114239.sh new file mode 100644 index 00000000..d05d7ee8 --- /dev/null +++ b/.history/ct/gitea_20240722114239.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ + ______(_)_/ /___ ____ _ + / __ / // __/ _ \/ __ / + / /_/ / // /_/ __/ /_/ / + \__, /_/ \__/\___/\__,_/ +/____/ + + ______ _ __ + / ____/(_)_/ /___ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +VERSION=${RELEASE#v} +msg_info "Updating Gitea to ${RELEASE}" +wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/nullexit +msg_ok "Updated Gitea to ${RELEASE}" +# else +# msg_ok "No update required ${APP} is already at ${RELEASE}" +# fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/gitea.sh b/ct/gitea.sh index 5708fb3a..d05d7ee8 100644 --- a/ct/gitea.sh +++ b/ct/gitea.sh @@ -65,7 +65,7 @@ header_info if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) VERSION=${RELEASE#v} -msg_info "Updating ${APP}" +msg_info "Updating Gitea to ${RELEASE}" wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64 systemctl stop gitea rm -rf /usr/local/bin/gitea @@ -73,7 +73,7 @@ mv gitea* /usr/local/bin/gitea systemctl start gitea apt-get update &>/dev/null apt-get -y upgrade &>/dev/nullexit -msg_ok "Updated ${APP} to ${RELEASE}" +msg_ok "Updated Gitea to ${RELEASE}" # else # msg_ok "No update required ${APP} is already at ${RELEASE}" # fi