27 lines
644 B
Bash
Executable File
27 lines
644 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ "${TARGET_PORT}" != "" ]]; then
|
|
sed -i -e "s,8123,${TARGET_PORT},g" /etc/nginx/sites-enabled/default
|
|
fi
|
|
/usr/sbin/nginx
|
|
|
|
mkdir -p /var/lib/shellinabox
|
|
chmod a+rwX /var/lib/shellinabox
|
|
/usr/bin/shellinaboxd --debug --no-beep --disable-peer-check \
|
|
-t \
|
|
-b \
|
|
-c /var/lib/shellinabox \
|
|
-s "/:root:root:/website:/bin/bash"
|
|
|
|
if [[ -z "${DEVELOPMENT}" ]]; then
|
|
echo "Running in PRODUCTION mode."
|
|
cd /website/server
|
|
{ while true; do npm start ; sleep 3 ; done ; }
|
|
else
|
|
echo "Running in DEVELOPMENT mode."
|
|
cd /website/server
|
|
{ while true; do npm start ; sleep 3 ; done ; } &
|
|
cd /website/client
|
|
npm start
|
|
fi
|