add http server support for maru, small bug fixes
[automated-distro-installer] / faiserver-disable
old mode 100644 (file)
new mode 100755 (executable)
index a0328d7..3cb6da2
@@ -15,4 +15,12 @@ if [[ $1 ]]; then
     usage 1
 fi
 
-ssh root@$(chost faiserver) "sed -ri --follow-symlinks '\%^/srv/fai/d' /etc/exports; exportfs -ra"
+ssh root@$(chost faiserver) bash <<'EOF'
+if modprobe nfsd &>/dev/null; then
+  sed -ri --follow-symlinks '\%^/srv/fai/d' /etc/exports
+  exportfs -ra
+else
+  rm -f /etc/apache2/sites-enabled/faiserver.conf
+  systemctl reload apache2
+fi
+EOF