adding scripting support

This commit is contained in:
Ric Harvey
2016-08-09 14:00:01 +01:00
parent aaf1b21ec8
commit faf0f8e7c3

View File

@@ -83,5 +83,17 @@ fi
# Always chown webroot for better mounting # Always chown webroot for better mounting
chown -Rf nginx.nginx /var/www/html 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 # Start supervisord and services
/usr/bin/supervisord -n -c /etc/supervisord.conf /usr/bin/supervisord -n -c /etc/supervisord.conf