diff --git a/scripts/start.sh b/scripts/start.sh index f50e95d..b9eebad 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -83,5 +83,17 @@ fi # Always chown webroot for better mounting chown -Rf nginx.nginx /var/www/html +# Run custom scripts +if [[ "$RUN_SCRIPTS" == "1" ]] ; then + if [ -d "/var/www/html/scripts/" ]; then + # make scripts executable incase they aren't + chmod -Rf 750 /var/www/html/scripts/* + # run scripts in number order + for i in `ls /var/www/html/scripts/`; do /var/www/html/scripts/$i ; done + else + echo "Can't find script directory" + fi +fi + # Start supervisord and services /usr/bin/supervisord -n -c /etc/supervisord.conf