diff --git a/ct/pterodactyl-wings.sh b/ct/pterodactyl-wings.sh index 86b481f74e..cddfab4784 100644 --- a/ct/pterodactyl-wings.sh +++ b/ct/pterodactyl-wings.sh @@ -23,29 +23,23 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -f /usr/local/bin/wings ]]; then + if [[ ! -x /usr/local/bin/wings ]]; then msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + + if check_for_gh_release "wings" "pterodactyl/wings"; then msg_info "Stopping Service" systemctl stop wings msg_ok "Stopped Service" - msg_info "Updating ${APP} to v${RELEASE}" rm /usr/local/bin/wings - curl -fsSL "https://github.com/pterodactyl/wings/releases/download/v${RELEASE}/wings_linux_amd64" -o "/usr/local/bin/wings" - chmod u+x /usr/local/bin/wings - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated $APP to v${RELEASE}" + fetch_and_deploy_gh_release "wings" "pterodactyl/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64" msg_info "Starting Service" systemctl start wings msg_ok "Started Service" msg_ok "Updated successfully!" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" fi exit } diff --git a/frontend/public/json/pterodactyl-wings.json b/frontend/public/json/pterodactyl-wings.json index 614495e1b1..ce5bfea803 100644 --- a/frontend/public/json/pterodactyl-wings.json +++ b/frontend/public/json/pterodactyl-wings.json @@ -12,7 +12,7 @@ "documentation": "https://pterodactyl.io/wings/1.0/installing.html", "website": "https://pterodactyl.io", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/pterodactyl.webp", - "config_path": "", + "config_path": "/etc/pterodactyl/config.yml", "description": "Pterodactyl Wings is Pterodactyl's server control plane, built for the rapidly changing gaming industry and designed to be highly performant and secure. Wings provides an HTTP API allowing you to interface directly with running server instances, fetch server logs, generate backups, and control all aspects of the server lifecycle.", "install_methods": [ { diff --git a/install/pterodactyl-wings-install.sh b/install/pterodactyl-wings-install.sh index 0b1b9ee8dd..08196f9d5d 100644 --- a/install/pterodactyl-wings-install.sh +++ b/install/pterodactyl-wings-install.sh @@ -21,13 +21,8 @@ $STD sh <(curl -fsSL https://get.docker.com) systemctl enable -q --now docker msg_ok "Installed Docker" -msg_info "Installing Pterodactyl Wings" -RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/pterodactyl/wings/releases/download/v${RELEASE}/wings_linux_amd64" -o "/usr/local/bin/wings" -chmod u+x /usr/local/bin/wings +fetch_and_deploy_gh_release "wings" "pterodactyl/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64" mkdir -p /etc/pterodactyl -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Installed Pterodactyl Wings" msg_info "Creating Service" cat </etc/systemd/system/wings.service