From 1e86957f100fc0f5edaf9785079cf4946c89e9d3 Mon Sep 17 00:00:00 2001 From: servusoft Date: Sat, 10 Feb 2018 18:49:18 +0100 Subject: [PATCH] split SSL params to 'secure' and 'verify' --- upload.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index 314043d..bee73a8 100755 --- a/upload.sh +++ b/upload.sh @@ -14,6 +14,10 @@ if [ -z "$PLUGIN_SECURE" ]; then PLUGIN_SECURE="true" fi +if [ -z "$PLUGIN_VERIFY" ]; then + PLUGIN_VERIFY="true" +fi + if [ -z "$PLUGIN_DEST_DIR" ]; then PLUGIN_DEST_DIR="/" fi @@ -34,4 +38,11 @@ for i in "${in_arr[@]}"; do PLUGIN_INCLUDE_STR="$PLUGIN_INCLUDE_STR -x $i" done -lftp -e "set xfer:log 1; set ftp:ssl-force $PLUGIN_SECURE; set ftp:ssl-protect-data $PLUGIN_SECURE; set ftp:ssl-allow $PLUGIN_SECURE; mirror -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" -u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME +lftp -e "set xfer:log 1; \ + set ftp:ssl-allow $PLUGIN_SECURE; \ + set ftp:ssl-force $PLUGIN_SECURE; \ + set ftp:ssl-protect-data $PLUGIN_SECURE; \ + set ssl:verify-certificate $PLUGIN_VERIFY; \ + set ssl:check-hostname $PLUGIN_VERIFY; \ + mirror --verbose -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" \ + -u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME