From 07c3a989812bf75a6de43b7ea694f2f74abd3460 Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 10:25:56 +0100 Subject: [PATCH 1/7] base build --- .travis.yml | 28 ++ citest/config.httpRequest.ini | 463 ++++++++++++++++++++++++++++++ citest/config.mysql.ini | 463 ++++++++++++++++++++++++++++++ citest/test.sh | 78 +++++ install.sh | 11 +- plugins/MySQL/boswatch-update.sql | 5 + plugins/MySQL/boswatch.sql | 4 +- testdata/testdata.org.txt | 120 ++++++++ testdata/testdata.txt | 85 ------ 9 files changed, 1166 insertions(+), 91 deletions(-) create mode 100644 .travis.yml create mode 100644 citest/config.httpRequest.ini create mode 100644 citest/config.mysql.ini create mode 100644 citest/test.sh create mode 100644 plugins/MySQL/boswatch-update.sql create mode 100644 testdata/testdata.org.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d39dc8f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: bash + +sudo: required + +branches: + only: + - master + - develop + +before_script: + - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty universe" + - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main" + - sudo apt-get update -qq + - sudo apt-get install -qq wget python2.7 + - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh +# - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh + - chmod +x install.sh + - cat /etc/os-release + - echo ${TRAVIS_BRANCH} + - sudo ./install.sh -b ${TRAVIS_BRANCH} -r no + +env: + - module=bash + - module=mysql + - module=httpRequest + +script: + - sudo /bin/bash citest/test.sh diff --git a/citest/config.httpRequest.ini b/citest/config.httpRequest.ini new file mode 100644 index 0000000..bfa08ec --- /dev/null +++ b/citest/config.httpRequest.ini @@ -0,0 +1,463 @@ +######################## +# BOSWatch Config File # +######################## + +[BOSWatch] +# set loglevel for logfile +# 10 = debug +# 20 = info +# 30 = warning +# 40 = error +# 50 = critical +loglevel = 10 + +# BOSWatch uses a rotating logfile +# Rotating is at midnight +# You can set the backupCount here +# backupCount = 7 (keeps logfiles for 7 days) +backupCount = 7 + +# if you want to start BOSWatch as a daemon with rc2.d, +# you have to set the path to rtl_fm and multimon-ng ! +# both pathes have to end with an / +#rtl_path = /usr/local/bin/ +#multimon_path = /usr/local/bin/ + +# if you are using many plugins or plugins with a long execution time +# you can execute them in an asynchronous manner +# It must be pointed out that enabling (0|1) this consumes time, +# so don't use it for one rapid plugin +processAlarmAsync = 0 + +# Using RegEx-filter (0 - off | 1 - on) +# filter-configuration in section [Filters] +useRegExFilter = 0 + +# for double check save the last n IDs +# it is used in combination with double_ignore_time +# 1 is required if you want to use the double alarm filter +doubleFilter_ignore_entries = 10 + +# time to ignore same alarm (only ID is checked) (sec) +doubleFilter_ignore_time = 5 + +# ignore msg is only usefull for POCSAG (0 - off | 1 - on) +# 0: double check ignores the msg-text (only check ID + function) +# 1: if you want to differentiate between with/ without msg +# f.e. if they use quick-alarm (without text, then same RIC with msg) +# you will get more then one alarm anyway if the msg is different (receiving-problems) +doubleFilter_check_msg = 0 + +# writes the multimon-ng raw data stream into a text file named mm_raw.txt +writeMultimonRaw = 1 + +[NMAHandler] +# you can use a logging handler for sending logging records to NotifyMyAndroid +# enableHandler (0|1) will enable the NMA handler +enableHandler = 0 + +# loglevel for NMAHandler (see BOSWatch loglevel description) +loglevel = 50 + +# logging record will send to APIKey +APIKey = + +# you can change the name of the application (default: BOSWatch) +# (f.e. if you use more than one instance of BOSWatch) +appName = BOSWatch + + +[FMS] +# look-up-table for adding a description +# using description (0 - off | 1 - on) +# descriptions are loaded from csv/fms.csv +idDescribed = 0 + +# Check for correct CRC-information is provided by multimon-ng +# As this seems to be incorrect in many cases it might be useful to disable this +# (0 - off | 1 - on) +# Better use RegEX to verify the correct data +checkCRC = 0 + +[ZVEI] +# look-up-table for adding a description +# using description (0 - off | 1 - on) +# descriptions are loaded from csv/zvei.csv +idDescribed = 0 + +[POC] +# some very simple filters: +# Allow only this RICs (empty: allow all, separator ",") +# f.e.: allow_ric = 1234566,1234567,1234568 +allow_ric = + +# Deny this RICs (empty: allow all, separator ",") +# f.e.: deny_ric = 1234566,1234567,1234568 +deny_ric = + +# start and end of an allowed filter range +filter_range_start = 0000000 +filter_range_end = 9999999 + +# look-up-table for adding a description +# using description (0 - off | 1 - on) +# descriptions are loaded from csv/poc.csv +idDescribed = 0 + +# Static Massages for Subrics. +rica = Feuer +ricb = TH +ricc = AGT +ricd = Unwetter + +# RIC for net identification +# Usually sent periodically, separated by comma +netIdent_ric = 0174760, 1398098 + +[Filters] +# RegEX Filter Configuration +# http://www.regexr.com/ - RegEX Test Tool an Documentation +# No Filter for a Typ/Plugin Combination = all Data pass +# INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX +# TYP = the Data Typ (FMS|ZVEI|POC) +# DATAFIELD = the field of the Data Array (see readme.md in plugin folder) +# PLUGIN = the name of the Plugin to call with this Filter (* for all) +# FREQUENZ = the Frequenz to use the Filter (for more SDR Sticks (* for all)) +# REGEX = the RegEX + +# only ZVEI to all plugins with 25### at 85.5MHz +#testfilter = ZVEI;zvei;*;85500000;25[0-9]{3} + +# only POCSAG to MySQL with the text "ALARM:" in the message +#pocTest = POC;msg;MySQL;*;ALARM: + + +[Plugins] +# turn the plugins on or off (0 - off | 1 - on) +MySQL = 0 +httpRequest = 1 +eMail = 0 +BosMon = 0 +firEmergency = 0 +jsonSocket = 0 +notifyMyAndroid = 0 +SMS = 0 +Sms77 = 0 +FFAgent = 0 +Pushover = 0 +Telegram = 0 +yowsup = 0 + +# for developing template-module +template = 0 + + +[MySQL] +# MySQL configuration +dbserver = localhost +dbuser = root +dbpassword = root +database = boswatch + +# tables in the database +tableFMS = bos_fms +tableZVEI = bos_zvei +tablePOC = bos_pocsag +tableSIG = bos_signal + + +[httpRequest] +# example URL http://example.com/remote.php?DESCR=%DESCR% + +# you can use the following wildcards in your URL as GET params: +# http://en.wikipedia.org/wiki/Query_string + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description from csv-file +# %TIME% = Time (by script) +# %DATE% = Date (by script) +fms_url = http://www.google.de?code=%FMS%&stat=%STATUS% +#fms_url = + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description from csv-file +# %TIME% = Time (by script) +# %DATE% = Date (by script) +zvei_url = http://www.google.de?zvei=%ZVEI% +#zvei_url = + +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric as character (a-d) +# %FUNCTEXT% = POCSAG function/Subric static massage definded in POCSAG section +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description from csv-file +# %TIME% = Time (by script) +# %DATE% = Date (by script) +poc_url = http://www.google.de?ric=%RIC%&subric=%FUNC%&msg=%MSG% +#poc_url = + + +[eMail] +# SMTP-Server +smtp_server = localhost +# Port of SMTP-server (default: ) +smtp_port = +# use tls for connection (0|1) +tls = 0 +# Use this, when SMTP-server has restricted access +user = +password = + +# Parameters for Alarm-Msg: +# "to" can be more than one address, comma separated +from = local@localhost +to = user@irgendwo, user2@woanders + +# Priority of the eMail: +# normal|urgent|non-urgent +priority = urgent + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +fms_subject = FMS: %FMS% +fms_message = %DATE% %TIME%: %FMS%%BR%Status: %STATUS% - Direction: %DIRT% - TSI: %TSI% + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +zvei_subject = Alarm: %ZVEI% +zvei_message = %DATE% %TIME%: %ZVEI% + +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric als character (a-d) +# %FUNCTEXT% = POCSAG function/Subric static massage definded in POCSAG section +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +poc_subject = Alarm: %RIC%%LPAR%%FUNCCHAR%%RPAR% +poc_message = %DATE% %TIME% - %DESCR%: %MSG% + + +[BosMon] +# IP-address of the server (without http://) +# actually no SSL-support +bosmon_server = 192.168.0.1 +bosmon_port = 80 + +# channel-name of type "Web-Telegramm" +bosmon_channel = channel + +# Use this, when BosMon has restricted access +bosmon_user = +bosmon_password = + + +[firEmergency] +# firEmergency configuration +firserver = localhost +firport = 9001 + + +[jsonSocket] +# Protocol for socket (TCP|UDP) +protocol = UDP +# IP-address of the server (without http://) +server = 192.168.0.1 +port = 8888 + + +[notifyMyAndroid] +# APIKey given from notifyMyAndroid +APIKey = + +# Priority goes from -2 (lowest) to 2 (highest). The default priority is 0 (normal) +priority = 0 + +# You can change the name of the application (default: BOSWatch) +# (f.e. if you use more than one instance of BOSWatch) +appName = BOSWatch + +# instead of a given APIKey/priority you could import them by a csv-file (0|1) +# APIKey and priority above will be ignored, if you use a csv +# configuration loaded from csv/nma.csv +usecsv = 0 + + +[SMS] +# be aware that you need 'gammu' installed and running +# at least you need an UMTS-stick which is supported by 'gammu' + +quantity = 1 +# be sensitive to single RIC +ric1 = 1234567 + +# but you can watch several subrics, comma-separated +subric1 = a, b + +# a single cellphone-number +phonenumber1 = 0160321654987 + +# and the text for the sms +# ! DO NOT USE ANY UMLAUT ! +text1 = Rueckruf Leitstelle! + + +[Sms77] +# SMS77 configuration +# Login Username +user = + +# Password or API Key +password = + +# Receiver singlenumber or groupname from adressbook +to = + +# Sender number or name +from = + +# Type of Message (see https://www.sms77.de/funktionen/smstypen and https://www.sms77.de/funktionen/http-api) +type = quality + + +[FFAgent] +# set live mode (0/1) +live = 0 + +# send messages as type test (0/1) +test = 1 + +# path to server certificate file +serverCertFile = + +# path to client certificate file (LIVE) +clientCertFile = + +# path to client certificate password file (LIVE) +clientCertPass = + +# webapi token +webApiToken = + +# webapi key +webApiKey = + +# access token +accessToken = + +# selective Call Code +selectiveCallCode = + + +[Pushover] +# Pushover API Key +api_key = + +# Pushover Userkey or Groupkey to receive message +user_key = + +# Title of the message +title = BOSWatch Message + +# Adapt Pocsag Subric (a,b,c,d) to Pushover Priorities (see https://pushover.net/api#priority) +SubA = 0 +SubB = 2 +SubC = 1 +SubD = 0 + +# how often should Pushover re-alert in seconds (emergency-messages) +retry = 30 + +# when should Pushover stop to re-alert in seconds (emergency-messages) +expire = 90 + +# use HTML in messages (0/1) +html = 1 + + +[Telegram] +# This is your unique BOT token. You will get it from the BotFather once you have created your BOT. +BOTTokenAPIKey = +# Create a group chat with your BOT and enter the chat ID here. +# The plugin will send messages as your BOT and post everything in this group chat. +BOTChatIDAPIKey = +# The plugin can extract a location from the POCSAG message. +# However, this will be done for the following RIC only (7 digits e.g. 0012345). +RICforLocationAPIKey = +# This is your Google API key. +# Required if you want to create a map based on location information received with the above RIC. +GoogleAPIKey = + +[yowsup] +# number or chat-number who whants to become the news +empfaenger = +# WhatsApp-number of that the news comes +sender = +# password from this number +password= + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +fms_message = %DATE% %TIME%: %FMS% + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +zvei_message = %DATE% %TIME%: %ZVEI% + +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric als character (a-d) +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +poc_message = %MSG% + + +##################### +##### Not ready yet # +##################### + +[template] +test1 = testString +test2 = 123456 diff --git a/citest/config.mysql.ini b/citest/config.mysql.ini new file mode 100644 index 0000000..7766f77 --- /dev/null +++ b/citest/config.mysql.ini @@ -0,0 +1,463 @@ +######################## +# BOSWatch Config File # +######################## + +[BOSWatch] +# set loglevel for logfile +# 10 = debug +# 20 = info +# 30 = warning +# 40 = error +# 50 = critical +loglevel = 10 + +# BOSWatch uses a rotating logfile +# Rotating is at midnight +# You can set the backupCount here +# backupCount = 7 (keeps logfiles for 7 days) +backupCount = 7 + +# if you want to start BOSWatch as a daemon with rc2.d, +# you have to set the path to rtl_fm and multimon-ng ! +# both pathes have to end with an / +#rtl_path = /usr/local/bin/ +#multimon_path = /usr/local/bin/ + +# if you are using many plugins or plugins with a long execution time +# you can execute them in an asynchronous manner +# It must be pointed out that enabling (0|1) this consumes time, +# so don't use it for one rapid plugin +processAlarmAsync = 0 + +# Using RegEx-filter (0 - off | 1 - on) +# filter-configuration in section [Filters] +useRegExFilter = 0 + +# for double check save the last n IDs +# it is used in combination with double_ignore_time +# 1 is required if you want to use the double alarm filter +doubleFilter_ignore_entries = 10 + +# time to ignore same alarm (only ID is checked) (sec) +doubleFilter_ignore_time = 5 + +# ignore msg is only usefull for POCSAG (0 - off | 1 - on) +# 0: double check ignores the msg-text (only check ID + function) +# 1: if you want to differentiate between with/ without msg +# f.e. if they use quick-alarm (without text, then same RIC with msg) +# you will get more then one alarm anyway if the msg is different (receiving-problems) +doubleFilter_check_msg = 0 + +# writes the multimon-ng raw data stream into a text file named mm_raw.txt +writeMultimonRaw = 1 + +[NMAHandler] +# you can use a logging handler for sending logging records to NotifyMyAndroid +# enableHandler (0|1) will enable the NMA handler +enableHandler = 0 + +# loglevel for NMAHandler (see BOSWatch loglevel description) +loglevel = 50 + +# logging record will send to APIKey +APIKey = + +# you can change the name of the application (default: BOSWatch) +# (f.e. if you use more than one instance of BOSWatch) +appName = BOSWatch + + +[FMS] +# look-up-table for adding a description +# using description (0 - off | 1 - on) +# descriptions are loaded from csv/fms.csv +idDescribed = 0 + +# Check for correct CRC-information is provided by multimon-ng +# As this seems to be incorrect in many cases it might be useful to disable this +# (0 - off | 1 - on) +# Better use RegEX to verify the correct data +checkCRC = 0 + +[ZVEI] +# look-up-table for adding a description +# using description (0 - off | 1 - on) +# descriptions are loaded from csv/zvei.csv +idDescribed = 0 + +[POC] +# some very simple filters: +# Allow only this RICs (empty: allow all, separator ",") +# f.e.: allow_ric = 1234566,1234567,1234568 +allow_ric = + +# Deny this RICs (empty: allow all, separator ",") +# f.e.: deny_ric = 1234566,1234567,1234568 +deny_ric = + +# start and end of an allowed filter range +filter_range_start = 0000000 +filter_range_end = 9999999 + +# look-up-table for adding a description +# using description (0 - off | 1 - on) +# descriptions are loaded from csv/poc.csv +idDescribed = 0 + +# Static Massages for Subrics. +rica = Feuer +ricb = TH +ricc = AGT +ricd = Unwetter + +# RIC for net identification +# Usually sent periodically, separated by comma +netIdent_ric = 0174760, 1398098 + +[Filters] +# RegEX Filter Configuration +# http://www.regexr.com/ - RegEX Test Tool an Documentation +# No Filter for a Typ/Plugin Combination = all Data pass +# INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX +# TYP = the Data Typ (FMS|ZVEI|POC) +# DATAFIELD = the field of the Data Array (see readme.md in plugin folder) +# PLUGIN = the name of the Plugin to call with this Filter (* for all) +# FREQUENZ = the Frequenz to use the Filter (for more SDR Sticks (* for all)) +# REGEX = the RegEX + +# only ZVEI to all plugins with 25### at 85.5MHz +#testfilter = ZVEI;zvei;*;85500000;25[0-9]{3} + +# only POCSAG to MySQL with the text "ALARM:" in the message +#pocTest = POC;msg;MySQL;*;ALARM: + + +[Plugins] +# turn the plugins on or off (0 - off | 1 - on) +MySQL = 1 +httpRequest = 0 +eMail = 0 +BosMon = 0 +firEmergency = 0 +jsonSocket = 0 +notifyMyAndroid = 0 +SMS = 0 +Sms77 = 0 +FFAgent = 0 +Pushover = 0 +Telegram = 0 +yowsup = 0 + +# for developing template-module +template = 0 + + +[MySQL] +# MySQL configuration +dbserver = localhost +dbuser = boswatch +dbpassword = root +database = boswatch + +# tables in the database +tableFMS = bos_fms +tableZVEI = bos_zvei +tablePOC = bos_pocsag +tableSIG = bos_signal + + +[httpRequest] +# example URL http://example.com/remote.php?DESCR=%DESCR% + +# you can use the following wildcards in your URL as GET params: +# http://en.wikipedia.org/wiki/Query_string + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description from csv-file +# %TIME% = Time (by script) +# %DATE% = Date (by script) +#fms_url = http://www.google.de?code=%FMS%&stat=%STATUS% +fms_url = + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description from csv-file +# %TIME% = Time (by script) +# %DATE% = Date (by script) +#zvei_url = http://www.google.de?zvei=%ZVEI% +zvei_url = + +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric as character (a-d) +# %FUNCTEXT% = POCSAG function/Subric static massage definded in POCSAG section +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description from csv-file +# %TIME% = Time (by script) +# %DATE% = Date (by script) +#poc_url = http://www.google.de?ric=%RIC%&subric=%FUNC%&msg=%MSG% +poc_url = + + +[eMail] +# SMTP-Server +smtp_server = localhost +# Port of SMTP-server (default: ) +smtp_port = +# use tls for connection (0|1) +tls = 0 +# Use this, when SMTP-server has restricted access +user = +password = + +# Parameters for Alarm-Msg: +# "to" can be more than one address, comma separated +from = local@localhost +to = user@irgendwo, user2@woanders + +# Priority of the eMail: +# normal|urgent|non-urgent +priority = urgent + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +fms_subject = FMS: %FMS% +fms_message = %DATE% %TIME%: %FMS%%BR%Status: %STATUS% - Direction: %DIRT% - TSI: %TSI% + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +zvei_subject = Alarm: %ZVEI% +zvei_message = %DATE% %TIME%: %ZVEI% + +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric als character (a-d) +# %FUNCTEXT% = POCSAG function/Subric static massage definded in POCSAG section +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +poc_subject = Alarm: %RIC%%LPAR%%FUNCCHAR%%RPAR% +poc_message = %DATE% %TIME% - %DESCR%: %MSG% + + +[BosMon] +# IP-address of the server (without http://) +# actually no SSL-support +bosmon_server = 192.168.0.1 +bosmon_port = 80 + +# channel-name of type "Web-Telegramm" +bosmon_channel = channel + +# Use this, when BosMon has restricted access +bosmon_user = +bosmon_password = + + +[firEmergency] +# firEmergency configuration +firserver = localhost +firport = 9001 + + +[jsonSocket] +# Protocol for socket (TCP|UDP) +protocol = UDP +# IP-address of the server (without http://) +server = 192.168.0.1 +port = 8888 + + +[notifyMyAndroid] +# APIKey given from notifyMyAndroid +APIKey = + +# Priority goes from -2 (lowest) to 2 (highest). The default priority is 0 (normal) +priority = 0 + +# You can change the name of the application (default: BOSWatch) +# (f.e. if you use more than one instance of BOSWatch) +appName = BOSWatch + +# instead of a given APIKey/priority you could import them by a csv-file (0|1) +# APIKey and priority above will be ignored, if you use a csv +# configuration loaded from csv/nma.csv +usecsv = 0 + + +[SMS] +# be aware that you need 'gammu' installed and running +# at least you need an UMTS-stick which is supported by 'gammu' + +quantity = 1 +# be sensitive to single RIC +ric1 = 1234567 + +# but you can watch several subrics, comma-separated +subric1 = a, b + +# a single cellphone-number +phonenumber1 = 0160321654987 + +# and the text for the sms +# ! DO NOT USE ANY UMLAUT ! +text1 = Rueckruf Leitstelle! + + +[Sms77] +# SMS77 configuration +# Login Username +user = + +# Password or API Key +password = + +# Receiver singlenumber or groupname from adressbook +to = + +# Sender number or name +from = + +# Type of Message (see https://www.sms77.de/funktionen/smstypen and https://www.sms77.de/funktionen/http-api) +type = quality + + +[FFAgent] +# set live mode (0/1) +live = 0 + +# send messages as type test (0/1) +test = 1 + +# path to server certificate file +serverCertFile = + +# path to client certificate file (LIVE) +clientCertFile = + +# path to client certificate password file (LIVE) +clientCertPass = + +# webapi token +webApiToken = + +# webapi key +webApiKey = + +# access token +accessToken = + +# selective Call Code +selectiveCallCode = + + +[Pushover] +# Pushover API Key +api_key = + +# Pushover Userkey or Groupkey to receive message +user_key = + +# Title of the message +title = BOSWatch Message + +# Adapt Pocsag Subric (a,b,c,d) to Pushover Priorities (see https://pushover.net/api#priority) +SubA = 0 +SubB = 2 +SubC = 1 +SubD = 0 + +# how often should Pushover re-alert in seconds (emergency-messages) +retry = 30 + +# when should Pushover stop to re-alert in seconds (emergency-messages) +expire = 90 + +# use HTML in messages (0/1) +html = 1 + + +[Telegram] +# This is your unique BOT token. You will get it from the BotFather once you have created your BOT. +BOTTokenAPIKey = +# Create a group chat with your BOT and enter the chat ID here. +# The plugin will send messages as your BOT and post everything in this group chat. +BOTChatIDAPIKey = +# The plugin can extract a location from the POCSAG message. +# However, this will be done for the following RIC only (7 digits e.g. 0012345). +RICforLocationAPIKey = +# This is your Google API key. +# Required if you want to create a map based on location information received with the above RIC. +GoogleAPIKey = + +[yowsup] +# number or chat-number who whants to become the news +empfaenger = +# WhatsApp-number of that the news comes +sender = +# password from this number +password= + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +fms_message = %DATE% %TIME%: %FMS% + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +zvei_message = %DATE% %TIME%: %ZVEI% + +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric als character (a-d) +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +poc_message = %MSG% + + +##################### +##### Not ready yet # +##################### + +[template] +test1 = testString +test2 = 123456 diff --git a/citest/test.sh b/citest/test.sh new file mode 100644 index 0000000..b4ab36f --- /dev/null +++ b/citest/test.sh @@ -0,0 +1,78 @@ +#!/bin/bash +bospath=/opt/boswatch/BOSWatch/ +echo $module +# ---------------------------------------------------------------------------------------------------------------------------------- +# base Tests +# ---------------------------------------------------------------------------------------------------------------------------------- +if [ $module == "base" ]; then + cp $bospath/config/config.template.ini $bospath/config/config.ini + sudo /usr/bin/python $bospath/boswatch.py -f 1 -d 0 -e 10 -a POC512 POC1200 POC2400 -v -t + boserror=$(sudo cat $bospath/log/boswatch.log | grep -i ERROR) + + sudo chmod 777 $bospath/log/boswatch.log + if grep -Fxq '\[ERROR' "$bospath/log/boswatch.log" + then + echo "Found Error in boswatch.log" + exit 1 + fi + + +# ---------------------------------------------------------------------------------------------------------------------------------- +# mysql Tests +# ---------------------------------------------------------------------------------------------------------------------------------- +elif [ $module == "mysql" ]; then + sudo cp citest/config.mysql.ini $bospath/config/config.ini + export DEBIAN_FRONTEND=noninteractive + sudo -E apt-get -q -y install mysql-server + sudo service mysql start + + sudo mysql -e "create database boswatch;" + sudo mysql boswatch < plugins/MySQL/boswatch.sql + + sudo /usr/bin/python $bospath/boswatch.py -f 1 -d 0 -e 10 -a POC512 POC1200 POC2400 -v -t + sudo chmod 777 $bospath/log/boswatch.log + + if grep -Fxq '\[ERROR' "$bospath/log/boswatch.log" + then + echo "Found Error in boswatch.log" + exit 1 + fi + + fms=$(mysql -s -N -u boswatch -proot boswatch -e "SELECT COUNT(*) FROM bos_fms;") + mysql -s -N -u boswatch -proot boswatch -e "SELECT COUNT(*) FROM bos_fms;" + if [ "$fms" == "0" ]; then + echo "FMS Table emtpy" + exit 1 + fi + + + zvei=$(mysql -s -N -u boswatch -proot boswatch -e "SELECT COUNT(*) FROM bos_zvei;") + mysql -s -N -u boswatch -proot boswatch -e "SELECT COUNT(*) FROM bos_zvei;" + if [ "$zvei" == "0" ]; then + echo "ZVEI Table emtpy" + exit 1 + fi + + + pocsag=$(mysql -s -N -u boswatch -proot boswatch -e "SELECT COUNT(*) FROM bos_pocsag;") + mysql -s -N -u boswatch -proot boswatch -e "SELECT COUNT(*) FROM bos_pocsag;" + if [ "$pocsag" == "0" ]; then + echo "POCSAG Table emtpy" + exit 1 + fi + + +# ---------------------------------------------------------------------------------------------------------------------------------- +# httpRequest Tests +# ---------------------------------------------------------------------------------------------------------------------------------- +elif [ $module == "httpRequest" ]; then + sudo cp citest/config.httpRequest.ini $bospath/config/config.ini + sudo /usr/bin/python $bospath/boswatch.py -f 1 -d 0 -e 10 -a POC512 POC1200 POC2400 -v -t + + sudo chmod 777 $bospath/log/boswatch.log + if grep -Fxq '\[ERROR' "$bospath/log/boswatch.log" + then + echo "Found Error in boswatch.log" + exit 1 + fi +fi diff --git a/install.sh b/install.sh index 3bd2c48..95338fc 100644 --- a/install.sh +++ b/install.sh @@ -56,7 +56,7 @@ for (( i=1; i<=$#; i=$i+2 )); do -b|--branch) case $arg2 in - dev) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;; + dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;; *) branch=master ;; esac ;; @@ -166,10 +166,13 @@ echo "-> download BOSWatch..................." cd $boswatchpath/ case $branch in - dev) git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ - exitcodefunction $? git-clone BOSWatch ;; +# "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ +# exitcodefunction $? git-clone BOSWatch-develop ;; + "dev") git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ + exitcodefunction $? git-clone BOSWatch-develop-jockel ;; *) git clone -b master https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ - exitcodefunction $? git-clone BOSWatch ;; +# *) git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ + exitcodefunction $? git-clone BOSWatch ;; esac tput cup 13 15 diff --git a/plugins/MySQL/boswatch-update.sql b/plugins/MySQL/boswatch-update.sql new file mode 100644 index 0000000..68a3dd7 --- /dev/null +++ b/plugins/MySQL/boswatch-update.sql @@ -0,0 +1,5 @@ +USE boswatch; + +-- rename old columns including little error-prevention +ALTER IGNORE TABLE `bos_pocsag` change `funktion` `function` INT(1); +ALTER IGNORE TABLE `bos_pocsag` change `funktionChar` `functionChar` TEXT(1); diff --git a/plugins/MySQL/boswatch.sql b/plugins/MySQL/boswatch.sql index 78e30eb..8a88c68 100644 --- a/plugins/MySQL/boswatch.sql +++ b/plugins/MySQL/boswatch.sql @@ -74,8 +74,8 @@ CREATE TABLE IF NOT EXISTS `bos_pocsag` ( ) ENGINE=MYISAM DEFAULT CHARSET=UTF8 AUTO_INCREMENT=1; -- rename old columns including little error-prevention -ALTER IGNORE TABLE `bos_pocsag` change `funktion` `function` INT(1); -ALTER IGNORE TABLE `bos_pocsag` change `funktionChar` `functionChar` TEXT(1); +#ALTER IGNORE TABLE `bos_pocsag` change `funktion` `function` INT(1); +#ALTER IGNORE TABLE `bos_pocsag` change `funktionChar` `functionChar` TEXT(1); -- -------------------------------------------------------- diff --git a/testdata/testdata.org.txt b/testdata/testdata.org.txt new file mode 100644 index 0000000..58e5a5e --- /dev/null +++ b/testdata/testdata.org.txt @@ -0,0 +1,120 @@ +# Testdata for the BOSWatch Test Mode function +# Data in Multimon-NG Raw Format +# Data is alternately passed to the decoder to simulate an used Radio-Frequency + +# +# POCSAG +# ------ +# +# The following settings in config.ini are expected for POCSAG +# +# [BOSWatch] +# useDescription = 1 +# doubleFilter_ignore_entries = 10 +# doubleFilter_check_msg = 1 +# +# [POC] +# deny_ric = 7777777 +# filter_range_start = 0000005 +# filter_range_end = 8999999 +# idDescribed = 1 +# + +# bitrate +POCSAG512: Address: 1000512 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay +POCSAG1200: Address: 1001200 Function: 1 Alpha: BOSWatch-Test: okay +POCSAG2400: Address: 1002400 Function: 1 Alpha: BOSWatch-Test: okay + +# function-code +POCSAG512: Address: 1000000 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 1000001 Function: 1 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 1000002 Function: 2 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 1000003 Function: 3 Alpha: BOSWatch-Test: okay + +# german special sign +POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay +POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test öäü: okay + +# witch csv +POCSAG512: Address: 1234567 Function: 1 Alpha: BOSWatch-Test: with csv + +# without csv +POCSAG1200: Address: 2345678 Function: 2 Alpha: BOSWatch-Test: without csv +POCSAG2400: Address: 3456789 Function: 3 Alpha: BOSWatch-Test: without csv + +# OHNE TEXT???? +POCSAG1200: Address: 1100000 Function: 0 +POCSAG1200: Address: 1100000 Function: 1 +POCSAG1200: Address: 1100000 Function: 2 +POCSAG1200: Address: 1100000 Function: 3 + +# duplicate with same and other msg +POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Testing: okay + +# duplicate in different order +POCSAG1200: Address: 2100000 Function: 2 +POCSAG1200: Address: 2100001 Function: 2 +POCSAG1200: Address: 2100002 Function: 2 +POCSAG1200: Address: 2100000 Function: 2 +POCSAG1200: Address: 2100001 Function: 2 +POCSAG1200: Address: 2100002 Function: 2 +POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate + +# invalid +POCSAG512: Address: 3 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 33 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 3333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 33333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 333333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 3333333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 333333F Function: 0 Alpha: BOSWatch-Test: invalid +POCSAG512: Address: 333333F Function: 1 Alpha: BOSWatch-Test: invalid +POCSAG512: Address: 3333333 Function: 4 Alpha: BOSWatch-Test: invalid + +# denied +POCSAG1200: Address: 7777777 Function: 1 Alpha: BOSWatch-Test: denied + +# out of filter Range +POCSAG1200: Address: 0000004 Function: 1 Alpha: BOSWatch-Test: out of filter start +POCSAG1200: Address: 9000000 Function: 1 Alpha: BOSWatch-Test: out of filter end + +# regEx-Filter? + + +# +# FMS +# --- +# +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=I (ohneNA,ohneSIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=I (ohneNA,ohneSIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=II (ohneNA,mit SIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=III(mit NA,ohneSIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=IV (mit NA,mit SIGNAL)) CRC correct + + +# +# ZVEI +# ---- +# + +#with csv description +ZVEI2: 12345 +#without csv description +ZVEI2: 56789 +#duplicate +ZVEI2: 56789 +#with repeat Tone +ZVEI2: 1F2F3 +#in case of invalid id +ZVEI2: 135 +#in case of a double-tone for siren n-'D's are sended +ZVEI2: DDD +ZVEI2: DDDDD diff --git a/testdata/testdata.txt b/testdata/testdata.txt index 58e5a5e..ca4da55 100644 --- a/testdata/testdata.txt +++ b/testdata/testdata.txt @@ -20,91 +20,6 @@ # idDescribed = 1 # -# bitrate -POCSAG512: Address: 1000512 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay -POCSAG1200: Address: 1001200 Function: 1 Alpha: BOSWatch-Test: okay -POCSAG2400: Address: 1002400 Function: 1 Alpha: BOSWatch-Test: okay - -# function-code -POCSAG512: Address: 1000000 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 1000001 Function: 1 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 1000002 Function: 2 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 1000003 Function: 3 Alpha: BOSWatch-Test: okay - -# german special sign -POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay -POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test öäü: okay - -# witch csv -POCSAG512: Address: 1234567 Function: 1 Alpha: BOSWatch-Test: with csv - -# without csv -POCSAG1200: Address: 2345678 Function: 2 Alpha: BOSWatch-Test: without csv -POCSAG2400: Address: 3456789 Function: 3 Alpha: BOSWatch-Test: without csv - -# OHNE TEXT???? -POCSAG1200: Address: 1100000 Function: 0 -POCSAG1200: Address: 1100000 Function: 1 -POCSAG1200: Address: 1100000 Function: 2 -POCSAG1200: Address: 1100000 Function: 3 - -# duplicate with same and other msg -POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Testing: okay - -# duplicate in different order -POCSAG1200: Address: 2100000 Function: 2 -POCSAG1200: Address: 2100001 Function: 2 -POCSAG1200: Address: 2100002 Function: 2 -POCSAG1200: Address: 2100000 Function: 2 -POCSAG1200: Address: 2100001 Function: 2 -POCSAG1200: Address: 2100002 Function: 2 -POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate - -# invalid -POCSAG512: Address: 3 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 33 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 3333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 33333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 333333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 3333333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 333333F Function: 0 Alpha: BOSWatch-Test: invalid -POCSAG512: Address: 333333F Function: 1 Alpha: BOSWatch-Test: invalid -POCSAG512: Address: 3333333 Function: 4 Alpha: BOSWatch-Test: invalid - -# denied -POCSAG1200: Address: 7777777 Function: 1 Alpha: BOSWatch-Test: denied - -# out of filter Range -POCSAG1200: Address: 0000004 Function: 1 Alpha: BOSWatch-Test: out of filter start -POCSAG1200: Address: 9000000 Function: 1 Alpha: BOSWatch-Test: out of filter end - -# regEx-Filter? - - -# -# FMS -# --- -# -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=I (ohneNA,ohneSIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=I (ohneNA,ohneSIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=II (ohneNA,mit SIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=III(mit NA,ohneSIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=IV (mit NA,mit SIGNAL)) CRC correct - - -# -# ZVEI -# ---- -# - #with csv description ZVEI2: 12345 #without csv description From 26ac670546c4c76e4a41f0bfeb393c4f9d23d5ed Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 11:18:08 +0100 Subject: [PATCH 2/7] update boswatch path added img on README --- README.md | 8 ++++---- citest/test.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e005716..3a69ada 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ **Codacy - static code analysis:** -|branch|quality| -|---|---| -|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)| -|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)| +|branch|quality|CI-Build| +|---|---|---| +|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)|[![Build Status](https://travis-ci.org/thejockel/BOSWatch.svg?branch=master)](https://travis-ci.org/thejockel/BOSWatch)| +|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[![Build Status](https://travis-ci.org/thejockel/BOSWatch.svg?branch=develop)](https://travis-ci.org/thejockel/BOSWatch)| **Achtung:** Die readme ist veraltet - Neue Informationen werden im Laufe der Zeit in das Github Wiki integriert! diff --git a/citest/test.sh b/citest/test.sh index b4ab36f..5dc310f 100644 --- a/citest/test.sh +++ b/citest/test.sh @@ -1,5 +1,5 @@ #!/bin/bash -bospath=/opt/boswatch/BOSWatch/ +bospath=/opt/boswatch/ echo $module # ---------------------------------------------------------------------------------------------------------------------------------- # base Tests From 1b171b243bc5eebf26f302377f8f1b811249c039 Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 11:27:44 +0100 Subject: [PATCH 3/7] added full testdata again --- testdata/testdata.org.txt | 120 -------------------------------------- testdata/testdata.txt | 85 +++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 120 deletions(-) delete mode 100644 testdata/testdata.org.txt diff --git a/testdata/testdata.org.txt b/testdata/testdata.org.txt deleted file mode 100644 index 58e5a5e..0000000 --- a/testdata/testdata.org.txt +++ /dev/null @@ -1,120 +0,0 @@ -# Testdata for the BOSWatch Test Mode function -# Data in Multimon-NG Raw Format -# Data is alternately passed to the decoder to simulate an used Radio-Frequency - -# -# POCSAG -# ------ -# -# The following settings in config.ini are expected for POCSAG -# -# [BOSWatch] -# useDescription = 1 -# doubleFilter_ignore_entries = 10 -# doubleFilter_check_msg = 1 -# -# [POC] -# deny_ric = 7777777 -# filter_range_start = 0000005 -# filter_range_end = 8999999 -# idDescribed = 1 -# - -# bitrate -POCSAG512: Address: 1000512 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay -POCSAG1200: Address: 1001200 Function: 1 Alpha: BOSWatch-Test: okay -POCSAG2400: Address: 1002400 Function: 1 Alpha: BOSWatch-Test: okay - -# function-code -POCSAG512: Address: 1000000 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 1000001 Function: 1 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 1000002 Function: 2 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 1000003 Function: 3 Alpha: BOSWatch-Test: okay - -# german special sign -POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay -POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test öäü: okay - -# witch csv -POCSAG512: Address: 1234567 Function: 1 Alpha: BOSWatch-Test: with csv - -# without csv -POCSAG1200: Address: 2345678 Function: 2 Alpha: BOSWatch-Test: without csv -POCSAG2400: Address: 3456789 Function: 3 Alpha: BOSWatch-Test: without csv - -# OHNE TEXT???? -POCSAG1200: Address: 1100000 Function: 0 -POCSAG1200: Address: 1100000 Function: 1 -POCSAG1200: Address: 1100000 Function: 2 -POCSAG1200: Address: 1100000 Function: 3 - -# duplicate with same and other msg -POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Testing: okay - -# duplicate in different order -POCSAG1200: Address: 2100000 Function: 2 -POCSAG1200: Address: 2100001 Function: 2 -POCSAG1200: Address: 2100002 Function: 2 -POCSAG1200: Address: 2100000 Function: 2 -POCSAG1200: Address: 2100001 Function: 2 -POCSAG1200: Address: 2100002 Function: 2 -POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate -POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate - -# invalid -POCSAG512: Address: 3 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 33 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 3333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 33333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 333333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 3333333 Function: 0 Alpha: BOSWatch-Test: okay -POCSAG512: Address: 333333F Function: 0 Alpha: BOSWatch-Test: invalid -POCSAG512: Address: 333333F Function: 1 Alpha: BOSWatch-Test: invalid -POCSAG512: Address: 3333333 Function: 4 Alpha: BOSWatch-Test: invalid - -# denied -POCSAG1200: Address: 7777777 Function: 1 Alpha: BOSWatch-Test: denied - -# out of filter Range -POCSAG1200: Address: 0000004 Function: 1 Alpha: BOSWatch-Test: out of filter start -POCSAG1200: Address: 9000000 Function: 1 Alpha: BOSWatch-Test: out of filter end - -# regEx-Filter? - - -# -# FMS -# --- -# -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=I (ohneNA,ohneSIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=I (ohneNA,ohneSIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=II (ohneNA,mit SIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=III(mit NA,ohneSIGNAL)) CRC correct -FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=IV (mit NA,mit SIGNAL)) CRC correct - - -# -# ZVEI -# ---- -# - -#with csv description -ZVEI2: 12345 -#without csv description -ZVEI2: 56789 -#duplicate -ZVEI2: 56789 -#with repeat Tone -ZVEI2: 1F2F3 -#in case of invalid id -ZVEI2: 135 -#in case of a double-tone for siren n-'D's are sended -ZVEI2: DDD -ZVEI2: DDDDD diff --git a/testdata/testdata.txt b/testdata/testdata.txt index ca4da55..58e5a5e 100644 --- a/testdata/testdata.txt +++ b/testdata/testdata.txt @@ -20,6 +20,91 @@ # idDescribed = 1 # +# bitrate +POCSAG512: Address: 1000512 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay +POCSAG1200: Address: 1001200 Function: 1 Alpha: BOSWatch-Test: okay +POCSAG2400: Address: 1002400 Function: 1 Alpha: BOSWatch-Test: okay + +# function-code +POCSAG512: Address: 1000000 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 1000001 Function: 1 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 1000002 Function: 2 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 1000003 Function: 3 Alpha: BOSWatch-Test: okay + +# german special sign +POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay +POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test öäü: okay + +# witch csv +POCSAG512: Address: 1234567 Function: 1 Alpha: BOSWatch-Test: with csv + +# without csv +POCSAG1200: Address: 2345678 Function: 2 Alpha: BOSWatch-Test: without csv +POCSAG2400: Address: 3456789 Function: 3 Alpha: BOSWatch-Test: without csv + +# OHNE TEXT???? +POCSAG1200: Address: 1100000 Function: 0 +POCSAG1200: Address: 1100000 Function: 1 +POCSAG1200: Address: 1100000 Function: 2 +POCSAG1200: Address: 1100000 Function: 3 + +# duplicate with same and other msg +POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2000001 Function: 2 Alpha: BOSWatch-Testing: okay + +# duplicate in different order +POCSAG1200: Address: 2100000 Function: 2 +POCSAG1200: Address: 2100001 Function: 2 +POCSAG1200: Address: 2100002 Function: 2 +POCSAG1200: Address: 2100000 Function: 2 +POCSAG1200: Address: 2100001 Function: 2 +POCSAG1200: Address: 2100002 Function: 2 +POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100000 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100001 Function: 2 Alpha: BOSWatch-Test: second is a duplicate +POCSAG1200: Address: 2100002 Function: 2 Alpha: BOSWatch-Test: second is a duplicate + +# invalid +POCSAG512: Address: 3 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 33 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 3333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 33333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 333333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 3333333 Function: 0 Alpha: BOSWatch-Test: okay +POCSAG512: Address: 333333F Function: 0 Alpha: BOSWatch-Test: invalid +POCSAG512: Address: 333333F Function: 1 Alpha: BOSWatch-Test: invalid +POCSAG512: Address: 3333333 Function: 4 Alpha: BOSWatch-Test: invalid + +# denied +POCSAG1200: Address: 7777777 Function: 1 Alpha: BOSWatch-Test: denied + +# out of filter Range +POCSAG1200: Address: 0000004 Function: 1 Alpha: BOSWatch-Test: out of filter start +POCSAG1200: Address: 9000000 Function: 1 Alpha: BOSWatch-Test: out of filter end + +# regEx-Filter? + + +# +# FMS +# --- +# +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=I (ohneNA,ohneSIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=I (ohneNA,ohneSIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=II (ohneNA,mit SIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 1=LST->FZG 2=III(mit NA,ohneSIGNAL)) CRC correct +FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Status 3=Einsatz Ab 0=FZG->LST 2=IV (mit NA,mit SIGNAL)) CRC correct + + +# +# ZVEI +# ---- +# + #with csv description ZVEI2: 12345 #without csv description From d89226c4ceecf4f0b13c74f9934fe2e359982c26 Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 11:45:56 +0100 Subject: [PATCH 4/7] update URLs for Schrolli91 Repo --- .travis.yml | 4 ++-- README.md | 4 ++-- install.sh | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index d39dc8f..2a7b632 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ before_script: - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main" - sudo apt-get update -qq - sudo apt-get install -qq wget python2.7 - - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh -# - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh +# - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh + - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh - chmod +x install.sh - cat /etc/os-release - echo ${TRAVIS_BRANCH} diff --git a/README.md b/README.md index 3a69ada..fb9e541 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ |branch|quality|CI-Build| |---|---|---| -|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)|[![Build Status](https://travis-ci.org/thejockel/BOSWatch.svg?branch=master)](https://travis-ci.org/thejockel/BOSWatch)| -|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[![Build Status](https://travis-ci.org/thejockel/BOSWatch.svg?branch=develop)](https://travis-ci.org/thejockel/BOSWatch)| +|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=master)](https://travis-ci.org/thejockel/BOSWatch)| +|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=develop)](https://travis-ci.org/thejockel/BOSWatch)| **Achtung:** Die readme ist veraltet - Neue Informationen werden im Laufe der Zeit in das Github Wiki integriert! diff --git a/install.sh b/install.sh index 95338fc..1dfc5e4 100644 --- a/install.sh +++ b/install.sh @@ -166,12 +166,9 @@ echo "-> download BOSWatch..................." cd $boswatchpath/ case $branch in -# "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ -# exitcodefunction $? git-clone BOSWatch-develop ;; - "dev") git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ - exitcodefunction $? git-clone BOSWatch-develop-jockel ;; + "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ + exitcodefunction $? git-clone BOSWatch-develop ;; *) git clone -b master https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ -# *) git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ exitcodefunction $? git-clone BOSWatch ;; esac From 1e88b52f44a88cc061225b41a11eb01b584b427a Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 11:47:44 +0100 Subject: [PATCH 5/7] fixed missing links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fb9e541..23b1c94 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ |branch|quality|CI-Build| |---|---|---| -|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=master)](https://travis-ci.org/thejockel/BOSWatch)| -|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=develop)](https://travis-ci.org/thejockel/BOSWatch)| +|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=master)](https://travis-ci.org/Schrolli91/BOSWatch)| +|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=develop)](https://travis-ci.org/Schrolli91/BOSWatch)| **Achtung:** Die readme ist veraltet - Neue Informationen werden im Laufe der Zeit in das Github Wiki integriert! From 9876092d3d93f2cd4b55470f835e33011129c517 Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 14:33:19 +0100 Subject: [PATCH 6/7] new tests --- .travis.yml | 4 ++-- citest/test.sh | 4 ++-- install.sh | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a7b632..d39dc8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ before_script: - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main" - sudo apt-get update -qq - sudo apt-get install -qq wget python2.7 -# - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh - - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh + - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh +# - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh - chmod +x install.sh - cat /etc/os-release - echo ${TRAVIS_BRANCH} diff --git a/citest/test.sh b/citest/test.sh index 5dc310f..2e3d21e 100644 --- a/citest/test.sh +++ b/citest/test.sh @@ -7,7 +7,6 @@ echo $module if [ $module == "base" ]; then cp $bospath/config/config.template.ini $bospath/config/config.ini sudo /usr/bin/python $bospath/boswatch.py -f 1 -d 0 -e 10 -a POC512 POC1200 POC2400 -v -t - boserror=$(sudo cat $bospath/log/boswatch.log | grep -i ERROR) sudo chmod 777 $bospath/log/boswatch.log if grep -Fxq '\[ERROR' "$bospath/log/boswatch.log" @@ -27,7 +26,8 @@ elif [ $module == "mysql" ]; then sudo service mysql start sudo mysql -e "create database boswatch;" - sudo mysql boswatch < plugins/MySQL/boswatch.sql + sudo mysql -e "\. plugins/MySQL/boswatch.sql" + #sudo mysql boswatch < plugins/MySQL/boswatch.sql sudo /usr/bin/python $bospath/boswatch.py -f 1 -d 0 -e 10 -a POC512 POC1200 POC2400 -v -t sudo chmod 777 $bospath/log/boswatch.log diff --git a/install.sh b/install.sh index 1dfc5e4..cc57562 100644 --- a/install.sh +++ b/install.sh @@ -166,7 +166,8 @@ echo "-> download BOSWatch..................." cd $boswatchpath/ case $branch in - "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ +# "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ + "dev") git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ exitcodefunction $? git-clone BOSWatch-develop ;; *) git clone -b master https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ exitcodefunction $? git-clone BOSWatch ;; From 75f1c31ece5b1e3d1a75a5bbf6b178fdc073cb89 Mon Sep 17 00:00:00 2001 From: Jockel Date: Mon, 20 Feb 2017 14:39:15 +0100 Subject: [PATCH 7/7] fixed issues --- .travis.yml | 4 ++-- install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d39dc8f..2a7b632 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ before_script: - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main" - sudo apt-get update -qq - sudo apt-get install -qq wget python2.7 - - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh -# - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh +# - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh + - wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh - chmod +x install.sh - cat /etc/os-release - echo ${TRAVIS_BRANCH} diff --git a/install.sh b/install.sh index cc57562..d0ae3c6 100644 --- a/install.sh +++ b/install.sh @@ -166,8 +166,8 @@ echo "-> download BOSWatch..................." cd $boswatchpath/ case $branch in -# "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ - "dev") git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ + "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ +# "dev") git clone -b develop https://github.com/thejockel/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ exitcodefunction $? git-clone BOSWatch-develop ;; *) git clone -b master https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ exitcodefunction $? git-clone BOSWatch ;;