mjpg-streamer: fix option enabled check in init.d
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Fri, 2 Aug 2024 19:46:38 +0000 (16:46 -0300)
committerRosen Penev <rosenp@gmail.com>
Sat, 3 Aug 2024 07:19:48 +0000 (00:19 -0700)
[ "$enabled" ] returns true whatever non-empty value enabled has,
including 0.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
multimedia/mjpg-streamer/Makefile
multimedia/mjpg-streamer/files/mjpg-streamer.init

index b05652784cd0d3543fe4221146c9846eac4adaf2..8d6027e2ceb168ddb97cd10bfc6d843af9ef39f6 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mjpg-streamer
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/jacksonliam/mjpg-streamer/tar.gz/v$(PKG_VERSION)?
index a1edf8c3fca4636c943eba5986b7a9c469982919..d76cdec3ba88815a8ad94ea8d878dc0d2a10ee2b 100644 (file)
@@ -16,7 +16,7 @@ start_instance() {
 
        local enabled
        config_get_bool enabled "$1" 'enabled' 0
-       [ "$enabled" ] || return
+       [ "$enabled" -gt 0 ] || return
 
        local input
        config_get input "$s" 'input'