diff options
author | startxfr <clarue@startx.fr> | 2015-11-28 16:00:38 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2015-11-28 16:00:38 +0100 |
commit | 05c9aa4a4d3572168878bf0e81eeac724a95454d (patch) | |
tree | 3cc6d3145ab8a131c2da29aaa2f7438ca23ad0df /Services/php | |
parent | 4bb17b8c05c6e430293217797eef694671ec1e1b (diff) | |
download | phpmyadmin-05c9aa4a4d3572168878bf0e81eeac724a95454d.tar.gz phpmyadmin-05c9aa4a4d3572168878bf0e81eeac724a95454d.tar.bz2 phpmyadmin-05c9aa4a4d3572168878bf0e81eeac724a95454d.tar.xz phpmyadmin-05c9aa4a4d3572168878bf0e81eeac724a95454d.zip |
change in apache script for handling ServerName
Diffstat (limited to 'Services/php')
-rw-r--r-- | Services/php/run.sh | 49 |
1 files changed, 4 insertions, 45 deletions
diff --git a/Services/php/run.sh b/Services/php/run.sh index bcddd35..a02537e 100644 --- a/Services/php/run.sh +++ b/Services/php/run.sh @@ -1,49 +1,8 @@ #!/bin/bash -source /bin/sx-lib.sh export HTTPDCONF=/etc/httpd/conf.d/app.conf -# Begin configuration before starting daemonized process -# and start generating host keys -function begin_config { - echo "=> BEGIN APACHE-PHP CONFIGURATION" - mkdir -p /var/run/httpd - if [ -v DOCROOT ]; then - echo "=> Changing document root to $DOCROOT" - ${DOCROOT=/data/www} - echo "DocumentRoot \"$DOCROOT\"" >> $HTTPDCONF - fi -} - -# End configuration process just before starting daemon -function end_config { - stop_server - echo "=> END APACHE-PHP CONFIGURATION" -} - -# Start the httpd server in background. Used to perform config -# against the database structure such as user creation -function start_server { - echo "=> Starting httpd + php server" - /usr/sbin/apachectl & - sleep 2 -} - -# Stop the httpd server running in background. -function stop_server { - echo "=> Stopping httpd + php server ..." - killall httpd - rm -rf /run/httpd/* - sleep 2 -} - -# Start the httpd server as a deamon and execute it inside -# the running shell -function start_daemon { - echo "=> Starting httpd + php daemon ..." - exec /usr/sbin/apachectl -D FOREGROUND -} - - +source /bin/sx-lib.sh +source /bin/sx-httpd.sh if [[ "$0" == *"run.sh" && ! $1 = "" ]];then eval "$@"; @@ -51,8 +10,8 @@ fi check_environment check_httpd_environment -display_container_header +display_container_httpd_header begin_config end_config -start_daemon display_container_started +start_daemon |