mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-15 19:53:31 +01:00
Refactor (#7096)
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user