From ccfda4ffe1a0a9186f9b501b54d46e5254ae1a83 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 21 Feb 2017 08:04:13 +0100 Subject: [PATCH 1/3] include beta branch handling --- .travis.yml | 1 + README.md | 5 +++-- install.sh | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a7b632..eee9e74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ sudo: required branches: only: - master + - beta - develop before_script: diff --git a/README.md b/README.md index 9ec8bc3..7c32c1c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -|branch|quality|CI-Build| +|Branch|Code Qualität|CI-Build| |---|---|---| |master|[![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)| +|beta|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/beta.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=4213030)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=beta)](https://travis-ci.org/Schrolli91/BOSWatch)| |develop|[![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)| **Unterstützung gesucht** -Zur Weiterentwicklung des Programms benötigen wir Deine Mithilfe - bitte melde dich per Issue, wenn du Anwender in einem verschlüsselten POCSAG-Netz und im (legalen) Besitz des dazugehörigen Schlüssels bist. +Zur Weiterentwicklung des Programms benötigen wir Deine Mithilfe - bitte melde dich per Issue, wenn du Anwender in einem verschlüsselten POCSAG-Netz und im (legalen) Besitz des dazugehörigen Schlüssels bist. In der Zukunft wollen wir die Möglichkeit schaffen, codierte Nachrichten zu entschlüsseln (und nur dann, wenn der Schlüssel bekannt ist!), dafür brauchen wir Dich als Tester! **Readme ist veraltet** - bitte im [Wiki](https://github.com/Schrolli91/BOSWatch/wiki) nachschauen! diff --git a/install.sh b/install.sh index d0ae3c6..5f42d75 100644 --- a/install.sh +++ b/install.sh @@ -57,6 +57,7 @@ for (( i=1; i<=$#; i=$i+2 )); do -b|--branch) case $arg2 in dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;; + beta) echo " !!! WARNING: you are using the BETA BRANCH !!! "; branch=beta ;; *) branch=master ;; esac ;; @@ -167,8 +168,9 @@ 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 && \ exitcodefunction $? git-clone BOSWatch-develop ;; + "beta") git clone -b beta https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ + exitcodefunction $? git-clone BOSWatch-beta ;; *) git clone -b master https://github.com/Schrolli91/BOSWatch >> $boswatchpath/install/setup_log.txt 2>&1 && \ exitcodefunction $? git-clone BOSWatch ;; esac From 230187faef1e5e2d685a6563af4b57870c554967 Mon Sep 17 00:00:00 2001 From: Smith-fms Date: Wed, 15 Mar 2017 17:00:01 +0100 Subject: [PATCH 2/3] BUG: dir-val false --- service/boswatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/boswatch.sh b/service/boswatch.sh index 1779e1b..70263b4 100755 --- a/service/boswatch.sh +++ b/service/boswatch.sh @@ -11,7 +11,7 @@ ### END INIT INFO # Change the next 3 lines to suit where you install your script and what you want to call it -DIR=/opt/boswatch/BOSWatch +DIR=/opt/boswatch DAEMON=$DIR/boswatch.py DAEMON_NAME=boswatch From 62fb787aefd1cabbdcce78412e5bc0023c2aadfb Mon Sep 17 00:00:00 2001 From: Florian Date: Sat, 25 Mar 2017 00:13:14 +0100 Subject: [PATCH 3/3] Check for old installation / copy config - check for old version (existing boswatch.py in two different folders) and copy it via /tmp to boswatchpath/old - copy config.template.ini to config.ini to enable boswatch starting after installation --- install.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/install.sh b/install.sh index 71b5b93..5c251ea 100644 --- a/install.sh +++ b/install.sh @@ -45,6 +45,27 @@ echo "So you have to make up manually if you want to use MySQL support" boswatchpath=/opt/boswatch reboot=false +didBackup=false + +# check for old version (for the old ones...) +if [ -f $boswatchpath/BOSWatch/boswatch.py ]; then + echo "Old installation found!" + echo "A backup will be copied to $boswatchpath/old" + + mkdir /tmp/boswatch + mv $boswatchpath/BOSWatch/* /tmp/boswatch/ + didBackup=true +fi + +#and the future... +if [ -f $boswatchpath/boswatch.py ]; then + echo "Old installation found!" + echo "A backup will be copied to $boswatchpath/old" + + mkdir /tmp/boswatch + mv $boswatchpath/* /tmp/boswatch/ + didBackup=true +fi for (( i=1; i<=$#; i=$i+2 )); do t=$((i + 1)) @@ -206,6 +227,16 @@ rm $boswatchpath/install/ -R mv $boswatchpath/BOSWatch/* $boswatchpath/ rm $boswatchpath/BOSWatch -R +#copy the template config to run boswatch +cp $boswatchpath/config/config.template.ini $boswatchpath/config/config.ini + + +#replay the backup +if [ $didBackup = "true" ]; then + mkdir $boswatchpath/old/ + mv /tmp/boswatch/* $boswatchpath/old/ +fi + if [ $reboot = "true" ]; then /sbin/reboot fi