From 5ed0d20348397519dabff4e53568e7b0316ed5f4 Mon Sep 17 00:00:00 2001 From: flothi Date: Tue, 22 Nov 2016 00:28:58 +0100 Subject: [PATCH 1/6] Update install.sh Adding 1 LOC: preset of var reboot as false to prevent errors caused by checking in l. 135 - variable is set only if arg is given which is the reason for the error --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 8b6ff2e..6dc8e15 100644 --- a/install.sh +++ b/install.sh @@ -16,6 +16,7 @@ echo "So you have to make up manually if you want to use MySQL support" boswatchpath=/opt/boswatch mkdir -p $boswatchpath +reboot=false for (( i=1; i<=$#; i=$i+2 )); do t=$((i + 1)) From 42a09f26857f30b14746f9281cc0f348350fdf4b Mon Sep 17 00:00:00 2001 From: flothi Date: Tue, 22 Nov 2016 12:54:53 +0100 Subject: [PATCH 2/6] Update install.sh Main function: Reconfigure the cursor to "normal" mode (l. 135) as it was invisible during installation Additionally fixed some spelling --- install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 6dc8e15..f233d78 100644 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ echo " by Bastian Schroll " echo "" echo "This may take a several minutes... Don't panic!" echo "" -echo "Caution, script don't install a Webserver with PHP and MySQL" +echo "Caution, script does not install a webserver with PHP and MySQL" echo "So you have to make up manually if you want to use MySQL support" boswatchpath=/opt/boswatch @@ -48,13 +48,13 @@ echo "" tput cup 13 15 echo "[ 1/10] [#---------]" tput cup 15 5 -echo "-> make a apt-get update................" +echo "-> make an apt-get update................" apt-get update -y > $boswatchpath/install/setup_log.txt 2>&1 tput cup 13 15 echo "[ 2/10] [##--------]" tput cup 15 5 -echo "-> download GIT an other stuff.........." +echo "-> download GIT and other stuff.........." apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake qt4-default libpulse-dev libx11-dev sox >> $boswatchpath/install/setup_log.txt 2>&1 tput cup 13 15 @@ -96,7 +96,7 @@ make install >> $boswatchpath/install/setup_log.txt 2>&1 tput cup 13 15 echo "[ 7/10] [#######---]" tput cup 15 5 -echo "-> download MySQL Connector for Python." +echo "-> download MySQL connector for Python." cd $boswatchpath/install wget "http://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-1.0.9.tar.gz/from/http://cdn.mysql.com/" -O mysql-connector.tar >> $boswatchpath/install/setup_log.txt 2>&1 tar xfv mysql-connector.tar >> $boswatchpath/install/setup_log.txt 2>&1 @@ -105,7 +105,7 @@ cd $boswatchpath/install/mysql-connector-python* tput cup 13 15 echo "[ 8/10] [########--]" tput cup 15 5 -echo "-> install MySQL Connector for Python.." +echo "-> install MySQL connector for Python.." chmod +x ./setup.py ./setup.py install >> $boswatchpath/install/setup_log.txt 2>&1 @@ -129,8 +129,10 @@ chmod +x * echo $'# BOSWatch - blacklist the DVB drivers to avoid conflict with the SDR driver\n blacklist dvb_usb_rtl28xxu \n blacklist rtl2830\n blacklist dvb_usb_v2\n blacklist dvb_core' >> /etc/modprobe.d/boswatch_blacklist_sdr.conf tput cup 17 1 -echo "BOSWatch are now installed in $boswatchpath/" -echo "Install ready!" +echo "BOSWatch is now installed in $boswatchpath/" +echo "Installation ready!" + +tput cnorm if [ $reboot = "true" ]; then /sbin/reboot From c96109899dec7a8c4217c76869dce6e7f355a0bc Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 25 Nov 2016 22:48:47 +0100 Subject: [PATCH 3/6] Update wildcardHandler.py Fixing problem that replacement has been tried whether POC was alarmed or ZVEI; works fine for both POC and ZVEI. Original author might verify, works fine for me --- includes/helper/wildcardHandler.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/helper/wildcardHandler.py b/includes/helper/wildcardHandler.py index 3f89f27..358f4b6 100644 --- a/includes/helper/wildcardHandler.py +++ b/includes/helper/wildcardHandler.py @@ -53,12 +53,13 @@ def replaceWildcards(text, data, lineBrakeAllowed=False): # replace POC data if "ric" in data: text = text.replace("%RIC%", data["ric"]) - if "function" in data: text = text.replace("%FUNC%", data["function"]) + if "function" in data: + text = text.replace("%FUNC%", data["function"]) + if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica")) + if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb")) + if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc")) + if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd")) if "functionChar" in data: text = text.replace("%FUNCCHAR%", data["functionChar"]) - if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica")) - if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb")) - if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc")) - if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd")) if "msg" in data: text = text.replace("%MSG%", data["msg"]) if "bitrate" in data: text = text.replace("%BITRATE%", str(data["bitrate"])) From 7ad21a7a6d3d7223f7240eb1199d3c63976722e5 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 16 Jan 2017 13:08:17 +0100 Subject: [PATCH 4/6] Update eMail.py Fixing wrong variable - globals to globalVars --- plugins/eMail/eMail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/eMail/eMail.py b/plugins/eMail/eMail.py index 1a4d26b..9c75fea 100644 --- a/plugins/eMail/eMail.py +++ b/plugins/eMail/eMail.py @@ -103,7 +103,7 @@ def run(typ,freq,data): # # connect to SMTP-Server # - server = smtplib.SMTP_SSL(globals.config.get("eMail", "smtp_server"), globals.config.get("eMail", "smtp_port")) + server = smtplib.SMTP_SSL(globalVars.config.get("eMail", "smtp_server"), globalVars.config.get("eMail", "smtp_port")) # debug-level to shell (0=no debug|1) server.set_debuglevel(0) From 8cdfef4bcefdb7ef5007129542bf62579ea3f1fc Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 16 Jan 2017 21:20:14 +0100 Subject: [PATCH 5/6] Update eMail.py Using only SMTP via SSL can lead to errors depending on the configuration of the mail server As there is no switch in the config file (which is good so) the approach is to use SSL first and, if this fails, switch to non-SSL connection. Due to the importance of this plugin the pull request is affecting the master-branch. --- plugins/eMail/eMail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/eMail/eMail.py b/plugins/eMail/eMail.py index 9c75fea..1919787 100644 --- a/plugins/eMail/eMail.py +++ b/plugins/eMail/eMail.py @@ -103,7 +103,10 @@ def run(typ,freq,data): # # connect to SMTP-Server # - server = smtplib.SMTP_SSL(globalVars.config.get("eMail", "smtp_server"), globalVars.config.get("eMail", "smtp_port")) + try: + server = smtplib.SMTP_SSL(globalVars.config.get("eMail", "smtp_server"), globalVars.config.get("eMail", "smtp_port")) + except: + server = smtplib.SMTP(globalVars.config.get("eMail", "smtp_server"), globalVars.config.get("eMail", "smtp_port")) # debug-level to shell (0=no debug|1) server.set_debuglevel(0) From 20e9f567a06f29a2752f7a305e3a18358c383115 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 16 Jan 2017 21:22:22 +0100 Subject: [PATCH 6/6] Update eMail.py Fixing if-condition for TLS --- plugins/eMail/eMail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/eMail/eMail.py b/plugins/eMail/eMail.py index 1919787..cd697b9 100644 --- a/plugins/eMail/eMail.py +++ b/plugins/eMail/eMail.py @@ -111,7 +111,7 @@ def run(typ,freq,data): server.set_debuglevel(0) # if tls is enabled, starttls - if globalVars.config.get("eMail", "tls"): + if globalVars.config.getboolean("eMail", "tls"): server.starttls() # if user is given, login