Added deploy script

This commit is contained in:
watsonb8 2020-12-11 22:01:07 -05:00
parent 4be1c53807
commit ddf37d6f18
2 changed files with 25 additions and 0 deletions

24
deploy.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
remote_user="bmw"
remote_server="linuxhost.me"
deploy_location="/home/bmw/homebridge-face-location"
#build
tsc --build
#copy files to remote machine
scp -r bin $remote_user@$remote_server:$deploy_location
scp -r out $remote_user@$remote_server:$deploy_location
scp -r weights $remote_user@$remote_server:$deploy_location
scp -r trainedModels $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

View File

@ -76,6 +76,7 @@ export class Rtsp {
public start(): void {
const argStrings = [
`-rtsp_transport tcp`,
`-i ${this._connecteionString}`,
`-r ${this._options.rate ?? 10}`,
`-vf mpdecimate,setpts=N/FRAME_RATE/TB`,