this looks like it does the trick - first time will issue a config procedure (I know we have redundant files in enigma-bbs-pre but that's a price for the enhanced deployment ease)

This commit is contained in:
David Abutbul
2022-01-25 23:30:38 +02:00
parent 234eef7585
commit b791c9e9bb
3 changed files with 74 additions and 30 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
prepopvols=("config" "mods" "art")
bbspath=/enigma-bbs
bbsstgp=/enigma-bbs-pre
if [[ ! -f $bbspath/config/config.hjson ]]; then
for dir in "${prepopvols[@]}"
do
if [ -n "$(find "$bbspath/$dir" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
cp -rp $bbsstgp/$dir/* $bbspath/$dir/
else
echo "WARN skipped $bbspath/$dir - vol Not empty/not a new setup - possible bad state"
fi
done
./oputil.js config new
fi
pm2-runtime main.js