move apparmor teardown to after user confirms continue on brick01
authorAndy Witter <awitter@georgialibraries.org>
Mon, 8 Apr 2019 20:12:23 +0000 (16:12 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Mon, 8 Apr 2019 20:12:23 +0000 (16:12 -0400)
templates/setup-head.sh

index 58095f2..add6ace 100755 (executable)
@@ -68,33 +68,6 @@ echo
 echo $(date) >> "$INSTALL_LOG"
 
 
-### Due to bug in apparmor profile for ejabberd we disable apparmor for installation
-echo;echo;echo;echo
-echo "Due to bug in apparmor profile for ejabberd we disable apparmor for installation"
-echo "Stopping and tearing down apparmor..."
-sleep 3
-echo;echo "stopping apparmor"
-if ! service apparmor stop 
-then
-       echo;echo;echo "Failed to stop apparmor"
-       echo "please run: service apparmor stop"
-       read -p "then press [Enter] to continue: " ENTER
-else
-       echo done.
-       sleep 1
-fi
-
-echo;echo "tearing down apparmor"
-if ! service apparmor teardown
-then
-       echo;echo;echo "Failed to teardown apparmor"
-       echo "Please run: service apparmor teardown"
-       read -p "then press [Enter] to continue: " ENTER
-else
-       echo done.
-       sleep 1
-fi
-
 Prep_DB_9_X () { #Prepare the database schema
 /openils/bin/eg_db_config --service all --create-schema --create-offline --create-database \
  --user EG_DB_USER --password EG_DB_PASSWORD --hostname MASTER_DB.CLUSTER_DOMAINNAME --port 5432 \
@@ -112,6 +85,33 @@ if echo "$THISHOST" | grep -q "brick01-head"
        read -p "Press [Enter] to coninue or [Ctrl]-[c] to quit"
 fi
 
+## Due to bug in apparmor profile for ejabberd we disable apparmor for installation
+echo;echo;echo;echo
+echo "Due to bug in apparmor profile for ejabberd we disable apparmor for installation"
+echo "Stopping and tearing down apparmor..."
+sleep 3
+echo;echo "stopping apparmor"
+if ! service apparmor stop
+then
+        echo;echo;echo "Failed to stop apparmor"
+        echo "please run: service apparmor stop"
+        read -p "then press [Enter] to continue: " ENTER
+else
+        echo done.
+        sleep 1
+fi
+
+echo;echo "tearing down apparmor"
+if ! service apparmor teardown
+then
+        echo;echo;echo "Failed to teardown apparmor"
+        echo "Please run: service apparmor teardown"
+        read -p "then press [Enter] to continue: " ENTER
+else
+        echo done.
+        sleep 1
+fi
+
 
 echo "Setting Hostname"
 sleep 2