Added deploy script
This commit is contained in:
parent
5cc45f47ec
commit
1d89355658
21
deploy.sh
Executable file
21
deploy.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
remote_user="bmw"
|
||||||
|
remote_server="192.168.1.31"
|
||||||
|
deploy_location="/home/bmw/homebridge-hue-chase"
|
||||||
|
|
||||||
|
#build
|
||||||
|
tsc --build
|
||||||
|
#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
|
@ -26,6 +26,7 @@
|
|||||||
"node": ">=7.6.0"
|
"node": ">=7.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/node": "^13.1.2",
|
||||||
"@types/node-hue-api": "^2.3.0",
|
"@types/node-hue-api": "^2.3.0",
|
||||||
"homebridge": "^0.4.50",
|
"homebridge": "^0.4.50",
|
||||||
"node-hue-api": "^4.0.0"
|
"node-hue-api": "^4.0.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user