mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-28 03:24:43 +00:00
dashy: fix yarn-missing on update and back up full user-data (#14548)
This commit is contained in:
+13
-16
@@ -23,37 +23,34 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /opt/dashy/public/ ]]; then
|
if [[ ! -d /opt/dashy ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||||
|
|
||||||
if check_for_gh_release "dashy" "Lissy93/dashy"; then
|
if check_for_gh_release "dashy" "Lissy93/dashy"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop dashy
|
systemctl stop dashy
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
msg_info "Backing up conf.yml"
|
msg_info "Backing up user-data"
|
||||||
if [[ -f /opt/dashy/public/conf.yml ]]; then
|
rm -rf /opt/dashy_user_data_backup
|
||||||
cp -R /opt/dashy/public/conf.yml /opt/dashy_conf_backup.yml
|
cp -r /opt/dashy/user-data /opt/dashy_user_data_backup
|
||||||
else
|
msg_ok "Backed up user-data"
|
||||||
cp -R /opt/dashy/user-data/conf.yml /opt/dashy_conf_backup.yml
|
|
||||||
fi
|
|
||||||
msg_ok "Backed up conf.yml"
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dashy" "Lissy93/dashy" "prebuild" "latest" "/opt/dashy" "dashy-*.tar.gz"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dashy" "lissy93/dashy" "prebuild" "latest" "/opt/dashy" "dashy-*.tar.gz"
|
||||||
|
|
||||||
msg_info "Updating Dashy"
|
msg_info "Updating Dashy"
|
||||||
cd /opt/dashy
|
cd /opt/dashy
|
||||||
$STD yarn install --ignore-engines --network-timeout 300000
|
$STD yarn install --ignore-engines --network-timeout 300000
|
||||||
msg_ok "Updated Dashy"
|
msg_ok "Updated Dashy"
|
||||||
|
|
||||||
msg_info "Restoring conf.yml"
|
msg_info "Restoring user-data"
|
||||||
cp /opt/dashy_conf_backup.yml /opt/dashy/user-data/conf.yml
|
cp -r /opt/dashy_user_data_backup/. /opt/dashy/user-data/
|
||||||
msg_ok "Restored conf.yml"
|
rm -rf /opt/dashy_user_data_backup
|
||||||
|
msg_ok "Restored user-data"
|
||||||
msg_info "Cleaning"
|
|
||||||
rm -rf /opt/dashy_conf_backup.yml /opt/dashy/public/conf.yml
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
|
|
||||||
msg_info "Starting Dashy"
|
msg_info "Starting Dashy"
|
||||||
systemctl start dashy
|
systemctl start dashy
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ Description=dashy
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/dashy
|
WorkingDirectory=/opt/dashy
|
||||||
Environment=NODE_OPTIONS=--openssl-legacy-provider
|
|
||||||
ExecStart=/usr/bin/node server.js
|
ExecStart=/usr/bin/node server.js
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user