summaryrefslogtreecommitdiffstats
path: root/Services/apache/sx
diff options
context:
space:
mode:
authorstartxfr <clarue@startx.fr>2014-12-05 22:33:01 +0100
committerstartxfr <clarue@startx.fr>2014-12-05 22:33:01 +0100
commit28d5ddd7f63e587d48a985ca3efa29fbac409947 (patch)
tree32f27f09ed0048f5a8c960409968638c3bcfe7ad /Services/apache/sx
parent0c46aa05e68dda40eb7f5b6f25b32a0fe32841a9 (diff)
downloadphpmyadmin-28d5ddd7f63e587d48a985ca3efa29fbac409947.tar.gz
phpmyadmin-28d5ddd7f63e587d48a985ca3efa29fbac409947.tar.bz2
phpmyadmin-28d5ddd7f63e587d48a985ca3efa29fbac409947.tar.xz
phpmyadmin-28d5ddd7f63e587d48a985ca3efa29fbac409947.zip
modification sur le serveur apache
Diffstat (limited to 'Services/apache/sx')
-rw-r--r--Services/apache/sx/httpd.sh43
-rw-r--r--Services/apache/sx/httpd_run.sh7
2 files changed, 50 insertions, 0 deletions
diff --git a/Services/apache/sx/httpd.sh b/Services/apache/sx/httpd.sh
new file mode 100644
index 0000000..a632dff
--- /dev/null
+++ b/Services/apache/sx/httpd.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+export TERM=dumb
+
+# Begin configuration before starting daemonized process
+# and start generating host keys
+function begin_config {
+ echo "=> Begin httpd configuration for host $HOSTNAME"
+ mkdir -p /var/run/httpd
+}
+
+# End configuration process just before starting daemon
+function end_config {
+ echo "=> End httpd 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 server ..."
+ /usr/sbin/apachectl &
+ sleep 8
+}
+
+# Stop the httpd server running in background.
+function stop_server {
+ echo "===> Stopping httpd server ..."
+ killall httpd
+ rm -rf /run/httpd/*
+ sleep 8
+}
+
+# Start the httpd server as a deamon and execute it inside
+# the running shell
+function start_daemon {
+ echo "=> Starting httpd daemon ..."
+ exec /usr/sbin/apachectl
+}
+
+
+if [[ "$0" == *"httpd.sh" && ! $1 = "" ]];then
+ eval "$@";
+fi \ No newline at end of file
diff --git a/Services/apache/sx/httpd_run.sh b/Services/apache/sx/httpd_run.sh
new file mode 100644
index 0000000..ef073a3
--- /dev/null
+++ b/Services/apache/sx/httpd_run.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+source /sx/httpd.sh
+
+begin_config
+end_config
+
+start_daemon \ No newline at end of file