Merged master into develop

This commit is contained in:
Bastian Schroll 2017-02-12 09:57:33 +01:00
commit 1c56509e25
2 changed files with 16 additions and 12 deletions

View file

@ -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"]))

View file

@ -11,11 +11,12 @@ 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
mkdir -p $boswatchpath
reboot=false
for (( i=1; i<=$#; i=$i+2 )); do
t=$((i + 1))
@ -47,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
@ -95,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
@ -104,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
@ -128,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