freeswitch: use return in init script
authorSebastian Kemper <sebastian_ml@gmx.net>
Tue, 8 Nov 2022 20:19:19 +0000 (21:19 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Tue, 8 Nov 2022 20:19:27 +0000 (21:19 +0100)
"start_service()" is a function, hence "return" should be used instead
of "exit".

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/freeswitch/files/freeswitch.init

index c390b9fca4c9c9a03e967d5f17e907e8cc1f544f..f2b0c9c1343d9ae8af80e90a960ceb820836a27d 100644 (file)
@@ -26,7 +26,7 @@ start_service() {
   config_get_bool enabled general enabled 0
   if [ $enabled -eq 0 ]; then
     $LOG_ERR service not enabled in /etc/config/$NAME
-    exit 1
+    return 1
   fi
 
   config_get_bool log_stderr general log_stderr 1
@@ -46,7 +46,7 @@ start_service() {
     $LOG_INFO using procd\'s default term_timeout
   elif ! [ 0 -lt "$term_timeout" ] 2>/dev/null; then
     $LOG_ERR invalid term_timeout in /etc/config/$NAME
-    exit 1
+    return 1
   fi
 
   for i in "$dir_localstate" "$dir_run"; do