55 lines
1.3 KiB
Bash
55 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# Author: bvdberg01
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/pterodactyl/wings
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
msg_info "Installing Docker"
|
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
|
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
|
$STD sh <(curl -fsSL https://get.docker.com)
|
|
systemctl enable -q --now docker
|
|
msg_ok "Installed Docker"
|
|
|
|
fetch_and_deploy_gh_release "wings" "pterodactyl/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
|
mkdir -p /etc/pterodactyl
|
|
|
|
msg_info "Creating Service"
|
|
cat <<EOF >/etc/systemd/system/wings.service
|
|
[Unit]
|
|
Description=Pterodactyl Wings Daemon
|
|
After=docker.service
|
|
Requires=docker.service
|
|
PartOf=docker.service
|
|
|
|
[Service]
|
|
User=root
|
|
WorkingDirectory=/etc/pterodactyl
|
|
LimitNOFILE=4096
|
|
PIDFile=/var/run/wings/daemon.pid
|
|
ExecStart=/usr/local/bin/wings
|
|
Restart=on-failure
|
|
StartLimitInterval=180
|
|
StartLimitBurst=30
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q --now wings
|
|
msg_ok "Created Service"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|