Update pingvin.sh and pingvin-install.sh (#1819)

This commit is contained in:
Michel Roegl-Brunner
2025-01-28 15:46:50 +01:00
committed by GitHub
parent d366d24dea
commit 97002e7047
2 changed files with 49 additions and 31 deletions

View File

@ -2,6 +2,7 @@
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# Co-Author: michelroegl-brunner
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@ -14,11 +15,12 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y git
$STD apt-get install -y gnupg
$STD apt-get install -y \
curl \
sudo \
mc \
git \
gnupg
msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository"
@ -34,11 +36,14 @@ $STD npm install pm2 -g
msg_ok "Installed Node.js"
msg_info "Installing Pingvin Share (Patience)"
git clone -q https://github.com/stonith404/pingvin-share /opt/pingvin-share
cd /opt/pingvin-share
$STD git fetch --tags
$STD git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
cd backend
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/stonith404/pingvin-share/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
wget -q "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip"
unzip -q v${RELEASE}.zip
echo "${RELEASE}" >"/opt/pingvin_version.txt"
mv pingvin-share-${RELEASE} /opt/pingvin-share
cd /opt/pingvin-share/backend
$STD npm install
$STD npm run build
$STD pm2 start --name="pingvin-share-backend" npm -- run prod
@ -57,6 +62,7 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/v${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"