2021-06-24 11:10:15 +00:00
|
|
|
#!/bin/bash
|
2021-06-24 10:36:27 +00:00
|
|
|
|
2021-07-18 12:10:21 +00:00
|
|
|
set -e
|
2021-06-24 10:36:27 +00:00
|
|
|
|
2021-07-18 12:10:21 +00:00
|
|
|
BASE_DIR=storage/app
|
2021-06-24 11:10:15 +00:00
|
|
|
|
2021-07-18 12:10:21 +00:00
|
|
|
# If FIDO_DIR not set, source the env file
|
|
|
|
[ -z "${FIDO_DIR}" -a -r .env ] && . .env
|
|
|
|
|
|
|
|
FIDO_DIR=${FIDO_DIR:-fido}
|
|
|
|
|
|
|
|
if [ ! -d "${BASE_DIR}/${FIDO_DIR}" ]; then
|
|
|
|
if ! mkdir ${BASE_DIR}/${FIDO_DIR}; then
|
|
|
|
echo "! ERROR creating FIDO_DIR [${BASE_DIR}/${FIDO_DIR}]"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2021-06-24 11:10:15 +00:00
|
|
|
|
2021-06-24 11:31:02 +00:00
|
|
|
echo "* Ready to start server"
|
2021-07-18 12:10:21 +00:00
|
|
|
echo " - INBOUND [${BASE_DIR}/${FIDO_DIR}]"
|
2021-06-24 11:31:02 +00:00
|
|
|
|
2021-06-26 00:57:18 +00:00
|
|
|
exec su www-data -s /bin/sh -c "./artisan server:start"
|