2016-01-16 07:19:42 +08:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export NODE_ENV=production
|
|
|
|
export silent=false
|
|
|
|
export daemon=false
|
|
|
|
|
2018-08-25 11:34:33 +08:00
|
|
|
if [[ "$*" == ./nodebb*start* ]]; then
|
2016-01-16 07:19:42 +08:00
|
|
|
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
2016-01-16 12:07:47 +08:00
|
|
|
if [ -e "$BB_SOURCE/config.json" ]; then
|
|
|
|
cp "$BB_SOURCE/config.json" "$BB_CONTENT/config.json"
|
|
|
|
fi
|
2016-01-16 07:19:42 +08:00
|
|
|
fi
|
|
|
|
|
2016-01-16 12:07:47 +08:00
|
|
|
if [ -e "$BB_CONTENT/config.json" ]; then
|
|
|
|
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
|
|
|
fi
|
2016-01-16 07:19:42 +08:00
|
|
|
|
|
|
|
exec "$@"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec "$@"
|