Preview Mode Links will not work in preview mode

Command Control Power • Apple Tech Support & Business Talk

How to schedule launchd to restart SMB Service in Mavericks Server

Jul 30, 2014

Dave Provine of Premier Mac was kind enough to write in with a great tip, following our discussion of SMB issues with Mavericks Server in Episode 60:

No need to restart that mini; you can just restart the SMB daemon, and since SMB is stateless, it normally won’t affect connected users.

To restart the smbd daemon in OS X Server 10.7 10.8 10.9 add this plist to launchd

 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ""> <plist version="1.0"> <dict> <key>Label</key> <string>com.psimac.restartsmb</string> <key>ProgramArguments</key> <array> <string>/bin/bash</string> <string>-c</string> <string>sleep 60;touch "/Library/Preferences/SystemConfiguration/"</string> </array> <key>RunAtLoad</key> <false/> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>2</integer> <key>Minute</key> <integer>0</integer> </dict> </dict> </plist> 

Dave continues:

All you have to do is actually 'touch' the /Library/Preferences/SystemConfiguration/ file and that's enough to restart it.

Thanks so much, Dave!