Merge pull request #26 from Bouni/master
Add debug option, SSH auto confirm fingerprint
This commit is contained in:
commit
89b3d3d4ed
@ -1,6 +1,7 @@
|
||||
FROM alpine:edge
|
||||
|
||||
RUN apk --no-cache add \
|
||||
openssh \
|
||||
libressl \
|
||||
lftp \
|
||||
bash
|
||||
|
@ -30,6 +30,10 @@ environment:
|
||||
PLUGIN_VERIFY: false
|
||||
PLUGIN_EXCLUDE: (egrep like pattern matching)
|
||||
PLUGIN_INCLUDE: (egrep like pattern matching)
|
||||
PLUGIN_CHMOD: true | false (default true)
|
||||
PLUGIN_CLEAN_DIR: true | false (default false)
|
||||
PLUGIN_AUTO_CONFIRM: true | false (default false)
|
||||
PLUGIN_DEBUG: true | false (default false)
|
||||
```
|
||||
|
||||
## Full file example
|
||||
|
15
upload.sh
15
upload.sh
@ -38,6 +38,18 @@ else
|
||||
PLUGIN_CLEAN_DIR=""
|
||||
fi
|
||||
|
||||
if [ -z "$PLUGIN_DEBUG" ]; then
|
||||
PLUGIN_DEBUG=""
|
||||
else
|
||||
PLUGIN_DEBUG="-d"
|
||||
fi
|
||||
|
||||
if [ -n "$PLUGIN_AUTO_CONFIRM" ]; then
|
||||
PLUGIN_AUTO_CONFIRM="true"
|
||||
else
|
||||
PLUGIN_AUTO_CONFIRM="false"
|
||||
fi
|
||||
|
||||
PLUGIN_EXCLUDE_STR=""
|
||||
PLUGIN_INCLUDE_STR=""
|
||||
|
||||
@ -50,10 +62,11 @@ for i in "${in_arr[@]}"; do
|
||||
PLUGIN_INCLUDE_STR="$PLUGIN_INCLUDE_STR -i '$i'"
|
||||
done
|
||||
|
||||
lftp -e "set xfer:log 1; \
|
||||
lftp $PLUGIN_DEBUG -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 sftp:auto-confirm $PLUGIN_AUTO_CONFIRM; \
|
||||
set ssl:verify-certificate $PLUGIN_VERIFY; \
|
||||
set ssl:check-hostname $PLUGIN_VERIFY; \
|
||||
set net:max-retries 3; \
|
||||
|
Loading…
Reference in New Issue
Block a user