added install.sh Script

added a automatic installation script for BOSWatch
This commit is contained in:
Bastian Schroll 2015-04-04 12:20:40 +02:00
parent 90b5de8acd
commit 4587355b4f
2 changed files with 79 additions and 2 deletions

View file

@ -4,7 +4,7 @@ Python Script to Recive and Decode German BOS Information with rtl_fm and multim
**Please** only use Code from **master-Branch** - thats the only stable!
### Features
#####Implementeted Features:
#####Implemented Features:
- FMS and ZVEI decoding and Displaying
- Filtering double alarms with adjustable time
- FMS and ZVEI validation (plausibility test)
@ -14,7 +14,7 @@ Python Script to Recive and Decode German BOS Information with rtl_fm and multim
#####Features for the Future:
- extensive filtering options
- POCSAG 512,1200,2400 support
- POCSAG 512,1200,2400 support (need RAW data from multimon-ng)
- automatic Audio recording at alarm
- Web Frontend with configuration
@ -63,6 +63,14 @@ optional arguments:
More Options you can find in the extern config.ini File in this Folder
```
### Installation
You can easy install BOSWatch with the install.sh Script.
Download it in any Folder you want.
Make it executeable `sudo chmod +x install.sh`
And use the script `sudo sh install.sh`
Now the script downloads and compile all needed data.
At the end you can find the Programm in `/home/pi/bos/BOSWatch`
### Requirements
- RTL_SDR (rtl_fm)
- Multimon-NG

69
install.sh Normal file
View file

@ -0,0 +1,69 @@
#!/bin/sh
clear
echo ""
echo " ##########################"
echo " # #"
echo " # BOSWatch Installer #"
echo " # #"
echo " ##########################"
echo ""
echo "This may take a several minutes... Don't panic!"
echo ""
echo "Caution, script don't installed a Webserver with PHP and MySQL"
echo "So you have to make up manually if you want to use MySQL support"
echo ""
mkdir -p /home/pi/bos/install
echo "[ 1/10] [#---------] make a apt-get update..."
apt-get update > /home/pi/bos/install/setup_log.txt 2>&1
echo "[ 2/10] [##--------] download GIT an other stuff..."
apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake libpulse-dev libx11-dev sox >> /home/pi/bos/install/setup_log.txt 2>&1
echo "[ 3/10] [###-------] download rtl_fm..."
cd /home/pi/bos/install
git clone git://git.osmocom.org/rtl-sdr.git >> /home/pi/bos/install/setup_log.txt 2>&1
cd rtl-sdr/
echo "[ 4/10] [####------] compile rtl_fm..."
mkdir -p build && cd build
cmake ../ -DINSTALL_UDEV_RULES=ON >> /home/pi/bos/install/setup_log.txt 2>&1
make >> /home/pi/bos/install/setup_log.txt 2>&1
make install >> /home/pi/bos/install/setup_log.txt 2>&1
ldconfig >> /home/pi/bos/install/setup_log.txt 2>&1
echo "[ 5/10] [#####-----] download multimon-ng..."
cd /home/pi/bos/install
git clone https://github.com/EliasOenal/multimonNG.git >> /home/pi/bos/install/setup_log.txt 2>&1
cd multimonNG/
echo "[ 6/10] [######----] compile multimon-ng..."
mkdir -p build
cd build
qmake ../multimon-ng.pro >> /home/pi/bos/install/setup_log.txt 2>&1
make >> /home/pi/bos/install/setup_log.txt 2>&1
make install >> /home/pi/bos/install/setup_log.txt 2>&1
echo "[ 7/10] [#######---] download MySQL Connector for Python..."
cd /home/pi/bos/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 >> /home/pi/bos/install/setup_log.txt 2>&1
tar xfv mysql-connector.tar >> /home/pi/bos/install/setup_log.txt 2>&1
cd mysql-connector-python*
echo "[ 8/10] [########--] install MySQL Connector for Python..."
chmod +x ./setup.py
./setup.py install >> /home/pi/bos/install/setup_log.txt 2>&1
echo "[ 9/10] [#########-] download BOSWatch..."
cd /home/pi/bos
git clone https://github.com/Schrolli91/BOSWatch >> /home/pi/bos/install/setup_log.txt 2>&1
echo "[10/10] [##########] configure..."
cd BOSWatch
chmod +x *
echo "# 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
echo ""
echo "BOSWatch are now in /home/pi/bos/BOSWatch/"
echo "Install ready!"