How to restart Samba conveniently
slitt at troubleshooters.com
Tue Oct 19 19:49:07 GMT 1999
Hi everyone -- thanks for the help
I've found the method to retrofit Red Hat's /etc/rc.d/init.d/smb to the new
directory structure. First a copy of /etc/rc.d/init.d/smb must be obtained
from a default Red Hat installation. In addition, your setup must have file
/etc/rc.d/init.d/functions, which is a set of utility shellscript routines.
Each of these two files requires exactly one line change:
*** /etc/rc.d/init.d/smb ***
There's a line that checks for the existence of smb.conf and exits if not:
[ -f /etc/smb.conf ] || exit 0
That line must be changed to the new location:
[ -f /usr/local/samba/lib/smb.conf ] || exit 0
*** /etc/rc.d/init.d/functions ***
Near the top there's a line that exports a default path:
To that line must be appended the Samba binary directory:
Once these two changes have been accomplished, the following commands
reliably start, stop and restart Samba:
Your mileage may vary. Please let me know if it does.
There are similar shellscripts in Caldera and Debian default Samba setups,
so they probably can be similarly retrofitted.
At 03:57 AM 10/20/1999 +1000, you wrote:
>I just downloaded and installed the source to 2.0.5a, and it worked
>perfectly. I really like the fact that everything by default goes under
>/usr/local/samba (I just did the ./configure; make; make install).
>The one thing I don't see is the start/stop/restart commands like I used to
>have in my Red Hat rpm installation:
>It was a shellscript to read the .pid files, stop, start or stop and start
>smbd and nmbd depending on the argument. Is there such a thing included in
>2.0.5a compiled from source, and if not, what's the best way for me to
>"roll my own".
More information about the samba