This commit is contained in:
Slaviša Arežina
2025-08-23 10:26:30 +02:00
committed by GitHub
parent 1fce2de5c1
commit 07394b9a7d
2 changed files with 9 additions and 20 deletions

View File

@ -21,18 +21,13 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "pf2etools" "Pf2eToolsOrg/Pf2eTools" "tarball" "latest" "/opt/Pf2eTools"
msg_info "Setup Pf2eTools"
cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip"
$STD unzip "${RELEASE}.zip"
mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools
msg_info "Configuring Pf2eTools"
cd /opt/Pf2eTools
$STD npm install
$STD npm run build
echo "${RELEASE}" >/opt/Pf2eTools_version.txt
msg_ok "Set up Pf2eTools"
msg_ok "Configured Pf2eTools"
msg_info "Creating Service"
cat <<EOF >>/etc/apache2/apache2.conf
@ -49,7 +44,6 @@ chmod -R 755 "/opt/Pf2eTools"
msg_ok "Created Service"
msg_info "Cleaning up"
rm -rf /opt/${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"