3 SERVICE='suanzi-support.service'
5 echo 'Install dependencies'
6 apt install sshpass || exit 1
7 pip install paho-mqtt || exit 1
9 echo 'Install suanzi-support'
10 cp suanzi-support /usr/local/bin/ || exit 1
12 echo "Install ${SERVICE}"
14 cp ${SERVICE} /lib/systemd/system || exit 1
15 systemctl enable ${SERVICE} || exit 1
17 echo "Start ${SERVICE}"
18 systemctl start ${SERVICE} || exit 1