mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-01 07:26:10 +02:00
removed python3 - not needed when running 12-buster-slim
also prep entrypoint even if it was shipped with no execution attrib and prevent restart loop since pm2-runtime always exits with 0
This commit is contained in:
parent
b791c9e9bb
commit
d63db9acc2
3 changed files with 19 additions and 9 deletions
|
@ -1,8 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
prepopvols=("config" "mods" "art")
|
||||
bbspath=/enigma-bbs
|
||||
bbsstgp=/enigma-bbs-pre
|
||||
if [[ ! -f $bbspath/config/config.hjson ]]; then
|
||||
|
||||
# Set some vars
|
||||
prepopvols=("config" "mods" "art") # these are folders which contain runtime needed files, and need to be represented in the host
|
||||
bbspath=/enigma-bbs # install location
|
||||
bbsstgp=/enigma-bbs-pre # staging location for prepopvals
|
||||
configname=config.hjson # this is the default name, this script is intended for easy get-go - make changes as needed
|
||||
|
||||
# Setup happens when there is no existing config file
|
||||
if [[ ! -f $bbspath/config/$configname ]]; then
|
||||
for dir in "${prepopvols[@]}"
|
||||
do
|
||||
if [ -n "$(find "$bbspath/$dir" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
|
||||
|
@ -13,4 +18,9 @@ if [[ ! -f $bbspath/config/config.hjson ]]; then
|
|||
done
|
||||
./oputil.js config new
|
||||
fi
|
||||
pm2-runtime main.js
|
||||
if [[ ! -f $bbspath/config/$configname ]]; then #make sure once more, otherwise pm2-runtime will loop if missing the config
|
||||
echo "for some reason you have skipped configuration - enigma will not work. please run config"
|
||||
exit 1
|
||||
else
|
||||
pm2-runtime main.js
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue