homebridge-harmony-control/deploy.sh

23 lines
629 B
Bash
Raw Normal View History

2019-08-01 23:21:46 +00:00
#!/bin/bash
remote_user="bmw"
remote_server="192.168.1.31"
deploy_location="/home/bmw/homebridge-harmony-control"
homebridge_location="/var/lib/homebridge/"
2019-08-09 21:25:03 +00:00
#build
tsc --build
2019-08-01 23:21:46 +00:00
#copy files to remote machine
scp -r bin $remote_user@$remote_server:$deploy_location
scp package.json $remote_user@$remote_server:$deploy_location
#install package
ssh -t $remote_user@$remote_server "sudo npm install -g --unsafe-perm $deploy_location"
#restart service
ssh -t
ssh -t $remote_user@$remote_server "sudo systemctl restart homebridge.service"
ssh -t $remote_user@$remote_server "sudo systemctl status homebridge.service"
echo done
exit