initial commit from old development

This commit is contained in:
2021-06-07 17:03:43 +02:00
commit c1e8b31910
8 changed files with 354 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
mac=`cat /sys/class/net/$(ip route get 8.8.8.8 | sed -n 's/.* dev \([^ ]*\).*/\1/p')/address`
arch=`uname -m`
### installing bsh gateway
echo -e "\033[36m Installing BSH Gateway.\033[0m"
if [ -d "/opt/bsh-gateway" ]; then
systemctl stop bsh-gateway.service
cp BSHGateWay.py /opt/bsh-gateway/
cp example-key.pem /opt/bsh-gateway/
cp example-cert.pem /opt/bsh-gateway/
else
mkdir /opt/bsh-gateway
cp BSHGateWay.py /opt/bsh-gateway/
cp example-key.pem /opt/bsh-gateway/
cp example-cert.pem /opt/bsh-gateway/
fi
cp bsh-gateway.service /lib/systemd/system/
chmod 644 /lib/systemd/system/bsh-gateway.service
systemctl daemon-reload
systemctl enable bsh-gateway.service
systemctl start bsh-gateway.service
echo -e "\033[32m Installation completed. BSH 2 MQTT Gateway is now up and running.\033[0m"