summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/set/post/S30samba-set.sh
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hook-scripts/set/post/S30samba-set.sh')
-rwxr-xr-xextras/hook-scripts/set/post/S30samba-set.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/extras/hook-scripts/set/post/S30samba-set.sh b/extras/hook-scripts/set/post/S30samba-set.sh
index 9153dcd0bb2..4bac61f48a1 100755
--- a/extras/hook-scripts/set/post/S30samba-set.sh
+++ b/extras/hook-scripts/set/post/S30samba-set.sh
@@ -115,16 +115,17 @@ if [ "0" = $(is_volume_started "$VOL") ]; then
exit 0
fi
-#Find smb.conf, smbd pid directory and smbd logfile path
-find_config_info
if [ "$enable_smb" = "enable" ]; then
+ #Find smb.conf, smbd pid directory and smbd logfile path
+ find_config_info
if ! grep --quiet "\[gluster-$VOL\]" /etc/samba/smb.conf ; then
add_samba_share $VOL
sighup_samba
fi
elif [ "$enable_smb" = "disable" ]; then
+ find_config_info
del_samba_share $VOL
sighup_samba
fi