aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/pam_smb/files/pam_smbd.sh.sample8
1 files changed, 6 insertions, 2 deletions
diff --git a/security/pam_smb/files/pam_smbd.sh.sample b/security/pam_smb/files/pam_smbd.sh.sample
index f40ebe13d3b2..fc7eaea8afbc 100644
--- a/security/pam_smb/files/pam_smbd.sh.sample
+++ b/security/pam_smb/files/pam_smbd.sh.sample
@@ -9,6 +9,10 @@ if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
fi
# stop
-elif [ "x$1" = "xstop" ]; then
- kill `cat $pidfiledir/pamsmbd.pid`
+if [ "x$1" = "xstop" ]; then
+ if [ -f "$pidfiledir/pamsmbd.pid" ]; then
+ kill `cat $pidfiledir/pamsmbd.pid`
+ else
+ killall 'pamsmbd'
+ fi
fi