Skip to content

Commit 0aa13fb

Browse files
authored
New Script: Pelican Wings (#2677)
* New Script: Pelican Wings * Remove $STD for stopping/starting service
1 parent 2d20686 commit 0aa13fb

File tree

3 files changed

+166
-0
lines changed

3 files changed

+166
-0
lines changed

ct/pelican-wings.sh

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: bvdberg01
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/pelican-dev/wings
7+
8+
APP="Pelican-Wings"
9+
var_tags="Gaming"
10+
var_cpu="2"
11+
var_ram="4096"
12+
var_disk="8"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -f /usr/local/bin/wings ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
31+
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
32+
msg_info "Stopping Service"
33+
systemctl stop wings
34+
msg_ok "Stopped Service"
35+
36+
msg_info "Updating ${APP} to v${RELEASE}"
37+
rm /usr/local/bin/wings
38+
wget -q -O /usr/local/bin/wings "https://github.com/pelican-dev/wings/releases/download/v${RELEASE}/wings_linux_amd64"
39+
chmod u+x /usr/local/bin/wings
40+
echo "${RELEASE}" >/opt/${APP}_version.txt
41+
msg_ok "Updated $APP to v${RELEASE}"
42+
43+
msg_info "Starting Service"
44+
systemctl start wings
45+
msg_ok "Started Service"
46+
msg_ok "Updated Successfully"
47+
else
48+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
49+
fi
50+
exit
51+
}
52+
53+
start
54+
build_container
55+
description
56+
57+
msg_ok "Completed Successfully!\n"
58+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

install/pelican-wings-install.sh

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: bvdberg01
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
color
9+
verb_ip6
10+
catch_errors
11+
setting_up_container
12+
network_check
13+
update_os
14+
15+
msg_info "Installing Dependencies"
16+
$STD apt-get install -y \
17+
curl \
18+
sudo \
19+
mc
20+
msg_ok "Installed Dependencies"
21+
22+
msg_info "Installing Docker"
23+
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
24+
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
25+
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
26+
$STD sh <(curl -sSL https://get.docker.com)
27+
systemctl enable -q --now docker
28+
msg_ok "Installed Docker"
29+
30+
msg_info "Installing Pelican Wings"
31+
RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
32+
wget -q -O /usr/local/bin/wings "https://github.com/pelican-dev/wings/releases/download/v${RELEASE}/wings_linux_amd64"
33+
chmod u+x /usr/local/bin/wings
34+
mkdir -p /etc/pelican /var/run/wings
35+
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
36+
msg_ok "Installed Pelican Wings"
37+
38+
msg_info "Creating Service"
39+
cat <<EOF >/etc/systemd/system/wings.service
40+
[Unit]
41+
Description=Wings Daemon
42+
After=docker.service
43+
Requires=docker.service
44+
PartOf=docker.service
45+
46+
[Service]
47+
User=root
48+
WorkingDirectory=/etc/pelican
49+
LimitNOFILE=4096
50+
PIDFile=/var/run/wings/daemon.pid
51+
ExecStart=/usr/local/bin/wings
52+
Restart=on-failure
53+
StartLimitInterval=180
54+
StartLimitBurst=30
55+
RestartSec=5s
56+
57+
[Install]
58+
WantedBy=multi-user.target
59+
EOF
60+
systemctl enable -q --now wings
61+
msg_ok "Created Service"
62+
63+
motd_ssh
64+
customize
65+
66+
msg_info "Cleaning up"
67+
$STD apt-get -y autoremove
68+
$STD apt-get -y autoclean
69+
msg_ok "Cleaned"

json/pelican-wings.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Pelican Wings",
3+
"slug": "pelican-wings",
4+
"categories": [
5+
24
6+
],
7+
"date_created": "2025-02-26",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": null,
12+
"documentation": "https://pelican.dev/docs/wings/install",
13+
"website": "https://pelican.dev/",
14+
"logo": "https://pelican.dev/img/logo.png",
15+
"description": "Pelican Wings is Pelican'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.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/pelican-wings.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 4096,
23+
"hdd": 8,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "After installation, you need to use the Auto Deploy command generated by Pelican Panel and, after running the command, restart the Wings service with `systemctl restart wings.service`",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)