transmission: add a disabled notification 12371/head
authorRosen Penev <rosenp@gmail.com>
Sun, 31 May 2020 22:36:12 +0000 (15:36 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 16 Jun 2020 02:44:15 +0000 (19:44 -0700)
Helps to see that transmission must be enabled.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/transmission/Makefile
net/transmission/files/transmission.init

index 4e452c6d5aedb699466fbcc18b23a424ebae6335..0e26a52cd37f3648defc3c7090950a336addf0d0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=3.00
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
index 7be368200d5bd728b7ed09f48ca5a9ec8321e835..eb49b64678289a292a70b5a079757ba0c2aa93f7 100644 (file)
@@ -41,7 +41,11 @@ transmission() {
 
        local enabled
        config_get_bool enabled "$cfg" enabled 0
-       [ "$enabled" -gt 0 ] || return 1
+       [ "$enabled" -gt 0 ] || {
+               echo "Transmission not enabled. Please enable in /etc/config/transmission"
+               logger -t "transmission" -p "daemon.info" "Transmission not enabled. Please enable in /etc/config/transmission"
+               return 1
+       }
 
        local config_dir
        config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission'