From ddf37d6f18a07799b37b6346a5c2ee293771f833 Mon Sep 17 00:00:00 2001 From: watsonb8 Date: Fri, 11 Dec 2020 22:01:07 -0500 Subject: [PATCH] Added deploy script --- deploy.sh | 24 ++++++++++++++++++++++++ src/rtsp/rtsp.ts | 1 + 2 files changed, 25 insertions(+) create mode 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..30dfeb2 --- /dev/null +++ b/deploy.sh @@ -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 \ No newline at end of file diff --git a/src/rtsp/rtsp.ts b/src/rtsp/rtsp.ts index 706675b..7ad56d1 100644 --- a/src/rtsp/rtsp.ts +++ b/src/rtsp/rtsp.ts @@ -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`,