diff --git a/ct/upgopher.sh b/ct/upgopher.sh index 21311cc48..6e8a7aecf 100644 --- a/ct/upgopher.sh +++ b/ct/upgopher.sh @@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}" var_ram="${var_ram:-512}" var_disk="${var_disk:-4}" var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -33,18 +33,13 @@ function update_script() { systemctl stop upgopher msg_ok "Stopped Services" - cd /opt/upgopher - RELEASE_URL=$(curl -s https://api.github.com/repos/wanetty/upgopher/releases/latest | grep "browser_download_url.*linux_amd64.tar.gz" | cut -d '"' -f 4) - wget -q "$RELEASE_URL" - tar -xzf upgopher_*_linux_amd64.tar.gz - mv upgopher_*_linux_amd64/* . - rmdir upgopher_*_linux_amd64 - rm -f upgopher_*_linux_amd64.tar.gz - chmod +x upgopher + fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_*_linux_amd64.tar.gz" + chmod +x /opt/upgopher/upgopher + msg_info "Starting Services" systemctl start upgopher msg_ok "Started Services" - msg_ok "Updated Successfully" + msg_ok "Updated successfully!" fi exit } diff --git a/frontend/public/json/upgopher.json b/frontend/public/json/upgopher.json index 6c9d85409..3e54643a0 100644 --- a/frontend/public/json/upgopher.json +++ b/frontend/public/json/upgopher.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 4, "os": "Debian", - "version": "12" + "version": "13" } } ], diff --git a/install/upgopher-install.sh b/install/upgopher-install.sh index 1b2f33f2e..ef07b77a6 100644 --- a/install/upgopher-install.sh +++ b/install/upgopher-install.sh @@ -13,25 +13,13 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y curl wget -msg_ok "Installed Dependencies" - msg_info "Installing Upgopher" mkdir -p /opt/upgopher -cd /opt/upgopher -RELEASE_URL=$(curl -s https://api.github.com/repos/wanetty/upgopher/releases/latest | grep "browser_download_url.*linux_amd64.tar.gz" | cut -d '"' -f 4) -wget -q "$RELEASE_URL" -tar -xzf upgopher_*_linux_amd64.tar.gz -mv upgopher_*_linux_amd64/* . -rmdir upgopher_*_linux_amd64 -rm -f upgopher_*_linux_amd64.tar.gz -chmod +x upgopher +fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_*_linux_amd64.tar.gz" +chmod +x /opt/upgopher/upgopher msg_ok "Installed Upgopher" msg_info "Configuring Upgopher" -# Use default configuration (no authentication, HTTP, default port/directory) -# Users can modify /etc/systemd/system/upgopher.service after installation to enable features UPGOPHER_PORT="9090" UPGOPHER_DIR="/opt/upgopher/uploads" mkdir -p "$UPGOPHER_DIR" @@ -62,6 +50,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean +$STD apt -y autoremove +$STD apt -y autoclean +$STD apt clean -y msg_ok "Cleaned"