Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docker/run-lamp.sh')
-rwxr-xr-xdocker/run-lamp.sh27
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'