mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
Keep Lubelogger data after update to a new version (#1200)
This commit is contained in:
parent
385b36d29e
commit
487f36fec6
@ -42,11 +42,19 @@ function update_script() {
|
|||||||
msg_info "Updating ${APP} to v${RELEASE}"
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
cd /opt
|
cd /opt
|
||||||
wget -q https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
wget -q https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
||||||
cp /opt/lubelogger/appsettings.json /opt/appsettings.json
|
mkdir -p /tmp/lubeloggerData/wwwroot
|
||||||
|
cp /opt/lubelogger/appsettings.json /tmp/lubeloggerData/appsettings.json
|
||||||
|
cp -r /opt/lubelogger/config /tmp/lubeloggerData/
|
||||||
|
cp -r /opt/lubelogger/data /tmp/lubeloggerData/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/translations ]] && cp -r /opt/lubelogger/wwwroot/translations /tmp/lubeloggerData/wwwroot/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/documents ]] && cp -r /opt/lubelogger/wwwroot/documents /tmp/lubeloggerData/wwwroot/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/images ]] && cp -r /opt/lubelogger/wwwroot/images /tmp/lubeloggerData/wwwroot/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/temp ]] && cp -r /opt/lubelogger/wwwroot/temp /tmp/lubeloggerData/wwwroot/
|
||||||
|
[[ -e /opt/lubelogger/log ]] && cp -r /opt/lubelogger/log /tmp/lubeloggerData/
|
||||||
rm -rf /opt/lubelogger
|
rm -rf /opt/lubelogger
|
||||||
unzip -qq LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip -d lubelogger
|
unzip -qq LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip -d lubelogger
|
||||||
chmod 700 /opt/lubelogger/CarCareTracker
|
chmod 700 /opt/lubelogger/CarCareTracker
|
||||||
mv -f /opt/appsettings.json /opt/lubelogger/appsettings.json
|
cp -rf /tmp/lubeloggerData/* /opt/lubelogger/
|
||||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||||
|
|
||||||
@ -56,6 +64,7 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf /opt/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
rm -rf /opt/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
||||||
|
rm -rf /tmp/lubeloggerData
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
@ -71,4 +80,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
||||||
|
Loading…
Reference in New Issue
Block a user