fix(webui): app-log removal uses runFileOp rm -f so uninstall can't hang
The uninstall branch of webuiUpdateAppLog removed the per-app WebUI log with a bare `rm`. The log lives in the container data plane and is owned by the container user, often without a write bit. A bare rm (run as root via `sudo init.sh uninstall`) prompts interactively for write-protected files — which hangs an otherwise-unattended deploy: the uninstall phase of a `full` redeploy stopped dead at "rm: remove write-protected regular file '.../frontend/logs/apps/<app>.log'?". Route it through runFileOp rm -f (as the container-data owner, force) to match the neighbouring uninstall_app.sh and the install branch's owner-aware createTouch/runFileWrite helpers. No prompt, correct owner. Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
b9dfbb89d1
commit
b7d95f5e95
@ -22,9 +22,12 @@ webuiUpdateAppLog()
|
|||||||
echo "=== LibrePortal Installation Started at $(date) ===" | runFileWrite "${log_file}" > /dev/null
|
echo "=== LibrePortal Installation Started at $(date) ===" | runFileWrite "${log_file}" > /dev/null
|
||||||
fi
|
fi
|
||||||
elif [[ "$type" == "uninstall" ]]; then
|
elif [[ "$type" == "uninstall" ]]; then
|
||||||
# Remove app log file
|
# Remove app log file via runFileOp (as the container-data owner) with
|
||||||
|
# -f: the log can be write-protected, and a bare rm prompts
|
||||||
|
# interactively for write-protected files, which hangs an unattended
|
||||||
|
# deploy (the uninstall phase of a 'full' redeploy).
|
||||||
if [ -f "${log_file}" ]; then
|
if [ -f "${log_file}" ]; then
|
||||||
local result=$(rm "${log_file}")
|
local result=$(runFileOp rm -f "${log_file}")
|
||||||
checkSuccess "Removed ${app_name}.log"
|
checkSuccess "Removed ${app_name}.log"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user