example-app/install.sh

11 lines
259 B
Bash
Executable File

#!/bin/bash
set -e
sudo pip install paho-mqtt
sudo sed -i "s/appName/$1_$2/g" /usr/local/sdt/app/$1_$2/example-app.service
sudo cp /usr/local/sdt/app/$1_$2/example-app.service /etc/systemd/system/$1.service
sudo systemctl start $1
sudo systemctl enable $1