clrghouz/init-php.sh

23 lines
454 B
Bash
Raw Normal View History

#!/bin/bash
2021-06-24 10:36:27 +00:00
set -e
2021-06-24 10:36:27 +00:00
BASE_DIR=storage/app
# 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:31:02 +00:00
echo "* Ready to start server"
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"