mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-19 13:36:25 +01:00
Refactor (#10069)
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
@ -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": [
|
||||
{
|
||||
|
||||
@ -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 <<EOF >/etc/systemd/system/wings.service
|
||||
|
||||
Reference in New Issue
Block a user