mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
[Fix]: Fixed rm Bug in pf2etools (#1292)
* [Fix]: Fixed rm Bug in pf2etools * Update pf2etools.sh
This commit is contained in:
parent
f98d81f5bf
commit
4888c33e4b
@ -45,15 +45,14 @@ function update_script() {
|
|||||||
|
|
||||||
# Execute Update
|
# Execute Update
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP}"
|
||||||
cd "/opt/${APP}"
|
cd /opt
|
||||||
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
||||||
unzip -q "${RELEASE}.zip"
|
unzip -q ${RELEASE}.zip
|
||||||
rm -rf "/opt/${APP}"
|
rm -rf "/opt/${APP}"
|
||||||
mv "${APP}-${RELEASE:1}" "/opt/${APP}"
|
mv ${APP}-${RELEASE:1} /opt/${APP}
|
||||||
cd /opt/Pf2eTools
|
cd /opt/Pf2eTools
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
cd ~
|
|
||||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
|
|
||||||
@ -62,7 +61,7 @@ function update_script() {
|
|||||||
|
|
||||||
# Cleaning up
|
# Cleaning up
|
||||||
msg_info "Cleaning Up"
|
msg_info "Cleaning Up"
|
||||||
rm -rf /opt/${APP}/${RELEASE}.zip
|
rm -rf /opt/${RELEASE}.zip
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleanup Completed"
|
msg_ok "Cleanup Completed"
|
||||||
|
@ -38,6 +38,7 @@ msg_ok "Installed Node.js"
|
|||||||
|
|
||||||
# Setup App
|
# Setup App
|
||||||
msg_info "Setup Pf2eTools"
|
msg_info "Setup Pf2eTools"
|
||||||
|
cd /opt
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
||||||
unzip -q "${RELEASE}.zip"
|
unzip -q "${RELEASE}.zip"
|
||||||
@ -65,7 +66,7 @@ msg_ok "Created Service"
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm "${RELEASE}.zip"
|
rm -rf /opt/${RELEASE}.zip
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
Reference in New Issue
Block a user