Merge branch 'master' of feistymeow.org:feisty_meow
[feisty_meow.git] / scripts / system / common_sysadmin.sh
index 4ab80ed3716e6092650b5e8b8b6c30763a9d9869..7f831e21aa4953214bdca0c13dc7044a73abd486 100644 (file)
@@ -186,6 +186,25 @@ function restart_bind()
 
 ############################################################################
 
+# 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.
+}
+
+############################################################################
+
 # apache2 methods...
 
 # removes a config file for apache given the app name and site name.