add ssh port

This commit is contained in:
Antonio J. Delgado 2023-01-30 09:48:27 +02:00
parent 0a841fde3d
commit 0d3794eb81

View file

@ -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