diff options
Diffstat (limited to 'docker/run-lamp.sh')
-rwxr-xr-x | docker/run-lamp.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docker/run-lamp.sh b/docker/run-lamp.sh new file mode 100755 index 00000000..885b616e --- /dev/null +++ b/docker/run-lamp.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +cleanup() +{ + apachectl graceful-stop + killall php-fpm7.0 + mysqladmin -u root -pownyourbits shutdown + killall cron + echo "Cleanup complete" +} + +trap cleanup SIGTERM + +echo "Starting PHP-fpm" +php-fpm7.0 & + +echo "Starting Apache" +/usr/sbin/apache2ctl start + +echo "Starting mariaDB" +mysqld & + +echo "Starting cron" +cron + +echo "Done" +while true; do sleep 0.5; done # do nothing, just wait for trap from 'docker stop' |