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/lamp/010lamp')
-rwxr-xr-xdocker/lamp/010lamp36
1 files changed, 36 insertions, 0 deletions
diff --git a/docker/lamp/010lamp b/docker/lamp/010lamp
new file mode 100755
index 00000000..9552d848
--- /dev/null
+++ b/docker/lamp/010lamp
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+source /usr/local/etc/library.sh
+
+set -e
+
+[[ "$1" == "stop" ]] && {
+ echo "Stopping apache"
+ apachectl graceful-stop
+ echo "Stopping PHP-fpm"
+ killall php-fpm7.0
+ echo "Stopping mariaDB"
+ mysqladmin -u root shutdown
+ echo "LAMP cleanup complete"
+ exit 0
+}
+
+# MOVE CONFIGS TO PERSISTENT VOLUME
+persistent_cfg /etc/apache2
+
+echo "Starting PHP-fpm"
+php-fpm7.0 &
+
+echo "Starting Apache"
+/usr/sbin/apache2ctl start
+
+echo "Starting mariaDB"
+mysqld &
+
+# wait for mariadb
+while :; do
+ [[ -S /var/run/mysqld/mysqld.sock ]] && break
+ sleep 0.5
+done
+
+exit 0