KDY
Members
-
Joined
-
Last visited
Solutions
-
KDY's post in Can not access web page (500 Internal Server Error) was marked as the answerI found why this error occurred,
This happened entirely because of my mistake.
I use a plugin called user.script.
It's a simple file-moving script like the one below.
#!/bin/bash shopt -s nullglob SRC="/mnt/cache/recorders" DST="/mnt/user/backup/recorders" for cam in cam1 cam2 cam3 cam4; do files=( $(ls -1 "$SRC"/${cam}_*.mp4 2>/dev/null | sort) ) count=${#files[@]} if (( count > 1 )); then for ((i=0; i<count-1; i++)); do f="${files[$i]}" mv "$f" "$DST/" done fi done
At first glance, it doesn’t seem problematic, but if the SRC directory doesn’t actually exist, this becomes a serious issue.
I think the ls command is pointing to /usr/local/emhttp/ and moving those files to DST.
This wasn’t a problem with user.script or unraid, it was my fault for writing dumb code.