launchd as watchdog replacement and smb
I have an XServe running 10.4.6 that shares a few TB via afp and smb. The server is bound to our AD and has been known to work well most of the time. The smb service doesn't stay running after a reboot and sometimes stops running altogether for seemingly no reason. When I re-start the service, AD single sign on is usually disabled too.
I would like to use launchd to ensure that smb is always running and that SSO is enabled.
Would this be as easy as creating a launchd plist file in /System/Library/LaunchAgents that watches the /usr/bin/smbd process, setting its OnDemand key to false, and loading it into launchd?
I am familiar with the "dsconfigad -enablesso" command, but I'm not sure how to have it run when the smbd process is respawned. Can launchd be used for this too?
Thanks in advance!