Revert "Exclude plugins from webroot update"

This reverts commit b4de5fa8be.
This commit is contained in:
billz
2025-11-03 12:12:01 +01:00
parent b4de5fa8be
commit 256277b85e

View File

@@ -638,19 +638,12 @@ function _download_latest_files() {
exit 1
fi
if [ "$upgrade" == 1 ] || [ "$update" == 1 ]; then
if [ -d "$source_dir/plugins" ]; then
find "$source_dir/plugins" -mindepth 1 -maxdepth 1 -type d ! -name '.git*' -exec rm -rf {} + 2>/dev/null
fi
fi
if [ -d "$webroot_dir" ] && [ "$update" == 0 ]; then
sudo mv $webroot_dir "$webroot_dir.`date +%F-%R`" || _install_status 1 "Unable to move existing webroot directory"
elif [ "$upgrade" == 1 ] || [ "$update" == 1 ]; then
exclude='--exclude=ajax/system/sys_read_logfile.php'
shopt -s extglob
sudo find "$webroot_dir" -mindepth 1 ! -path "${webroot_dir}/ajax" ! -path "${webroot_dir}/ajax/*" ! -path "${webroot_dir}/plugins" ! -path "${webroot_dir}/plugins/*" -delete 2>/dev/null
sudo find "$webroot_dir/ajax" ! -path "${webroot_dir}/ajax/system/sys_read_logfile.php" -delete 2>/dev/null
sudo find "$webroot_dir" ! -path "${webroot_dir}/ajax/system/sys_read_logfile.php" -delete 2>/dev/null
fi
_install_log "Installing application to $webroot_dir"
@@ -659,7 +652,7 @@ function _download_latest_files() {
if [ "$update" == 1 ]; then
_install_log "Applying existing configuration to ${webroot_dir}/includes"
sudo mv /tmp/config.php $webroot_dir/includes || _install_status 1 "Unable to move config.php to ${webroot_dir}/includes"
if [ -f /tmp/raspap.auth ]; then
_install_log "Applying existing authentication file to ${raspap_dir}"
sudo mv /tmp/raspap.auth $raspap_dir || _install_status 1 "Unable to restore authentification credentials file to ${raspap_dir}"