Merge branch 'release-2.140.106'
[feisty_meow.git] / scripts / system / common_sysadmin.sh
index 50f240fa65f6296f2a409e241ae64e78ea23229a..7f831e21aa4953214bdca0c13dc7044a73abd486 100644 (file)
@@ -181,7 +181,26 @@ function restart_bind()
     echo "The bind service did not restart properly.  Please check the error logs."
     exit 1
   fi
-  echo DNS server restarted.
+  echo DNS service restarted.
+}
+
+############################################################################
+
+# samba server helper functions...
+
+function restart_samba
+{
+  echo restarting samba server.
+  service smbd restart
+  if [ $? -ne 0 ]; then
+    echo "The samba service did not restart properly.  Please check the error logs."
+    exit 1
+  fi
+  service nmbd restart
+  if [ $? -ne 0 ]; then
+    echo "The samba name service (nmbd) did not restart properly.  This may not always be fatal, so we are ignoring it, but you may want to check the error logs."
+  fi
+  echo samba service restarted.
 }
 
 ############################################################################
@@ -317,6 +336,7 @@ function restart_apache()
     echo "Please consult the apache error logs for more details."
     exit 1
   fi
+  echo Apache2 service restarted.
 }
 
 # sets up the serverpilot storage location for a user hosted web site.
@@ -337,7 +357,7 @@ function maybe_create_site_storage()
   chmod -R g+rx "$chow_path"
   # walk backwards up the path and fix perms.
   while [[ $chow_path != $HOME ]]; do
-echo chow path is now $chow_path
+#echo chow path is now $chow_path
     chmod g+rx "$chow_path"
     test_or_die "Failed to add group permissions on the path: $chow_path"
     # reassert the user's ownership of any directories we might have just created.