2 ## library file for test functions
6 ## start/stop smbd daemon
10 ## the smbcontrol ping will return a 0 on success
11 smbcontrol $CONFIGURATION smbd ping 2>&1 > /dev/null
16 echo "Starting smbd...."
18 smbd $CONFIGURATION || return $?
22 smbcontrol $CONFIGURATION `cat $PIDDIR/smbd.pid` ping 2>&1 > /dev/null || return $?
27 smbd_pid=`cat $PIDDIR/smbd.pid`
28 echo "Shutting down smbd (pid $smbd_pid)..."
30 ## belt and braces; first kill and then send a shutdown message
33 smbcontrol $CONFIGURATION smbd shutdown
35 ## check to see if smbd is already running
38 echo "Unable to stop smbd!"
45 ## start/stop smbd daemon
49 ## the smbcontrol ping will return a 0 on success
50 smbcontrol $CONFIGURATION nmbd ping 2>&1 > /dev/null
55 echo "Starting nmbd...."
57 nmbd $CONFIGURATION || return $?
61 # smbcontrol $CONFIGURATION `cat $PIDDIR/nmbd.pid` ping 2>&1 > /dev/null || return $?
62 kill -0 `cat $PIDDIR/nmbd.pid`
67 nmbd_pid=`cat $PIDDIR/nmbd.pid`
68 echo "Shutting down nmbd (pid $nmbd_pid)..."
70 ## belt and braces; first kill and then send a shutdown message
72 kill -TERM $nmbd_pid 2> /dev/null
75 ## check to see if smbd is already running
76 kill -0 $nmbd_pid 2> /dev/null
78 echo "Unable to stop nmbd!"