add wings and service
This commit is contained in:
parent
cef3cbb5f5
commit
e9b9f5e977
2 changed files with 37 additions and 0 deletions
16
conf/wings.service
Normal file
16
conf/wings.service
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Pterodactyl Wings Daemon
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
#Group=some_group
|
||||
WorkingDirectory=/srv/daemon
|
||||
LimitNOFILE=4096
|
||||
PIDFile=/var/run/wings/daemon.pid
|
||||
ExecStart=/usr/bin/node /srv/daemon/src/index.js
|
||||
Restart=on-failure
|
||||
StartLimitInterval=600
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -176,12 +176,33 @@ php artisan p:environment:setup --author=$email --url=https://$domain --timezone
|
|||
php artisan migrate --seed --force
|
||||
popd
|
||||
|
||||
#==============================================
|
||||
# Install wings
|
||||
#==============================================
|
||||
|
||||
ynh_package_install apt-transport-https ca-certificates curl gnupg2 software-properties-common zip unzip tar make gcc g++ python curl gnupg
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
|
||||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
|
||||
ynh_package_update
|
||||
ynh_package_install docker-ce
|
||||
systemctl enable docker
|
||||
systemctl start docker
|
||||
mkdir -p /srv/daemon /srv/daemon-data
|
||||
pushd /srv/daemon
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
|
||||
ynh_package_install nodejs make gcc g++
|
||||
curl -L https://github.com/pterodactyl/daemon/releases/download/v0.6.8/daemon.tar.gz | tar --strip-components=1 -xzv
|
||||
npm install --only=production
|
||||
sudo npm start
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_add_systemd_config
|
||||
systemctl enable $app.service
|
||||
systemctl enable --now wings
|
||||
|
||||
#=================================================
|
||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
|
|
Loading…
Reference in a new issue