initial commit from old development
This commit is contained in:
26
linux-service/easy_install.sh
Normal file
26
linux-service/easy_install.sh
Normal 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"
|
||||
Reference in New Issue
Block a user