ctdb-tests: Create 41.httpd.sh
authorMartin Schwenke <martin@meltin.net>
Mon, 19 Mar 2018 09:43:15 +0000 (20:43 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 28 Mar 2018 00:57:17 +0000 (02:57 +0200)
Contains testing support used only by tests for 41.httpd event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/eventscripts/scripts/41.httpd.sh [new file with mode: 0644]
ctdb/tests/eventscripts/scripts/local.sh

diff --git a/ctdb/tests/eventscripts/scripts/41.httpd.sh b/ctdb/tests/eventscripts/scripts/41.httpd.sh
new file mode 100644 (file)
index 0000000..89ff6d1
--- /dev/null
@@ -0,0 +1,16 @@
+setup_httpd ()
+{
+       debug "Setting up HTTPD environment: service $1, not managed by CTDB"
+
+       if [ "$1" != "down" ] ; then
+               for _service_name in "apache2" "httpd" ; do
+                       service "$_service_name" start
+               done
+       else
+               for _service_name in "apache2" "httpd" ; do
+                       service "$_service_name" force-stopped
+               done
+       fi
+
+       export CTDB_MANAGES_HTTPD=""
+}
index 04c34773008eb66ea936f657d58ffaecf92ee973..787b4940d4de05c561297d60964f5873985f6499 100644 (file)
@@ -896,27 +896,6 @@ program $_rpc_service${_ver:+ version }${_ver} is not available"
 
 ######################################################################
 
-# HTTPD fakery
-
-setup_httpd ()
-{
-       debug "Setting up HTTPD environment: service $1, not managed by CTDB"
-
-       if [ "$1" != "down" ] ; then
-               for _service_name in "apache2" "httpd" ; do
-                       service "$_service_name" start
-               done
-       else
-               for _service_name in "apache2" "httpd" ; do
-                       service "$_service_name" force-stopped
-               done
-       fi
-
-       export CTDB_MANAGES_HTTPD=""
-}
-
-######################################################################
-
 # Result and test functions
 
 # Set some globals and print the summary.