wsdd2: fix stopping service

Function start_service() is called whenever service may need reloading.
If SMB server is not running it could be simply because it has been
stopped. Reloading service in such case is not an error so:
1. Don't log error as it isn't one
2. Don't exit with error code as it was confusing procd

This change fixes scenario like:
/etc/init.d/ksmbd stop
/etc/init.d/wsdd2 reload
(previously above wasn't stopping wsdd2)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 6020ca52bf)
This commit is contained in:
Rafał Miłecki 2023-05-11 13:27:32 +02:00
parent 2884d1072c
commit 36ba94fcda
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ start_service() {
}
[ -z "$SMB_CONF" ] && {
logger -p daemon.error -t 'wsdd2' "samba36/4 or ksmbd is not running, can't start wsdd2!"
exit 1
logger -p daemon.info -t 'wsdd2' "samba36/4 or ksmbd is not running"
return
}
# cleanup comments