mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-18 18:54:03 +00:00
* suggestarr: keep the data where the app actually reads it The env file sets CONFIG_DIR=/opt/suggestarr_data and the service passes it through, but SuggestArr never reads that variable. Its database manager builds the path from the application directory: DB_PATH = os.path.join(BASE_DIR, 'config', 'config_files', 'requests.db') so config.yaml, requests.db and secret.key live under /opt/suggestarr, which the update wipes with CLEAN_INSTALL. Every update came back as a fresh install. Make config/config_files a symlink to /opt/suggestarr_data and lay it down again after each deploy, since the deploy replaces it with a real directory. Existing installs have their files copied across first, with cp -an so anything already in the data directory wins. CONFIG_DIR stays in the env file: it is inert today and costs nothing if upstream starts reading it. * suggestarr: let a failed migration stop the update The || true was wrong and the review caught it. CLEAN_INSTALL wipes /opt/suggestarr right after this copy, so swallowing a failure here means the source is deleted with nothing carried across. The guard was not even doing anything: cp -an exits 0 when it skips a file that already exists in the target, which is the only case that looked like it needed one. It only returns non-zero on a real failure, which is exactly when the update has to stop - and it now stops before the deploy, with the original data still in place. cp -an, target file exists -> exit 0, continues cp -an, source missing -> exit 1, ERR trap, aborts before deploy 2>/dev/null goes as well, so the reason is visible.
2.8 KiB
2.8 KiB