From 0d3794eb8149974bb8ffef09e5a08cec263c5430 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 30 Jan 2023 09:48:27 +0200 Subject: [PATCH] add ssh port --- files/process_motion_event.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/files/process_motion_event.sh b/files/process_motion_event.sh index c1ca841..ad5eef6 100644 --- a/files/process_motion_event.sh +++ b/files/process_motion_event.sh @@ -169,6 +169,11 @@ do move_to="${1}" shift ;; + "--move-to-port") + shift + move_to_port="${1}" + shift + ;; *) ;; esac @@ -178,7 +183,7 @@ if [ -n "${file}" ]; then file_uri=$(echo "${file}" | sed 's|/srv/expendable_data|https://ficheros.koti.site|g') data="${data}, \"file_uri\": \"${file_uri}\"" if [ -n "${move_to}" ]; then - scp "${file}" "${move_to}/" && rm -rf "${file}" + scp -P "${move_to_port}" "${file}" "${move_to}/" && rm -rf "${file}" fi fi