From 2be80b04dd59a29de6e4a165936fb8dd927283c5 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Tue, 8 Nov 2022 22:01:01 +0100 Subject: [PATCH] kamailio: use return in init script "check_listen()" & "start_service()" are functions, hence "return" should be used instead of "exit". Signed-off-by: Sebastian Kemper --- net/kamailio/files/kamailio.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/kamailio/files/kamailio.init b/net/kamailio/files/kamailio.init index a796407..bf36507 100644 --- a/net/kamailio/files/kamailio.init +++ b/net/kamailio/files/kamailio.init @@ -26,7 +26,7 @@ check_listen() { [ -z "$value" ] && { $LOG_ERR empty $type entry - exit 1 + return 1 } # IPv6 addresses need to be enclosed in square brackets. If there are @@ -39,7 +39,7 @@ check_listen() { # Bail if more than 2 colons. [ $(echo "$value" | awk -F ":" '{print NF-1}') -gt 2 ] && { $LOG_ERR init script does not understand $type entry \""$value"\" - exit 1 + return 1 } IFS=":" read one two three << EOF @@ -93,7 +93,7 @@ start_service() { if [ $enabled -eq 0 ]; then $LOG_ERR service not enabled in /etc/config/$NAME - exit 1 + return 1 fi config_get user general user $NAME -- 2.30.2