fix(deploy): make seed-data.sh recursive for directory entries
The Restreamer UI bundle includes subdirectories (_player, _playersite, static, locales) and the Dockerfile copies the whole tree into /core/static. seed-data.sh on first boot was using flat 'cp -p' which errors on directories with 'omitting directory ...'; set -e then exits, the container restarts forever in a crash loop, and Core never starts. Fix: 'cp -Rp' so directories are copied as trees. The no-clobber check on the top-level name still keeps operator-edited content safe — if /core/data/_player exists we don't replace it, even if its internals diverge from the bundled version. Also defends against dotfiles via the second glob. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
26991ec463
commit
c616f15c96
1 changed files with 6 additions and 2 deletions
|
|
@ -23,11 +23,15 @@ if [ ! -d "$DST" ]; then
|
|||
mkdir -p "$DST"
|
||||
fi
|
||||
|
||||
for f in "$SRC"/*; do
|
||||
# Iterate over both files and directories. The Restreamer UI bundle
|
||||
# ships subdirectories (_player, _playersite, static) so this needs
|
||||
# the recursive flag; the no-clobber check on the top-level name keeps
|
||||
# operator-edited content safe.
|
||||
for f in "$SRC"/* "$SRC"/.[!.]*; do
|
||||
[ -e "$f" ] || continue
|
||||
name=$(basename "$f")
|
||||
if [ ! -e "$DST/$name" ]; then
|
||||
cp -p "$f" "$DST/$name"
|
||||
cp -Rp "$f" "$DST/$name"
|
||||
echo "seed-data: copied $name -> $DST/$name"
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in a new issue