Skip to content

Commit 953c47a

Browse files
Florian Wallnernachoparker
authored andcommitted
Extend the ssh configuration check by calling the echo command if the first check fails.
Signed-off-by: Florian Wallner <florian.wallner@exxcellent.de> Signed-off-by: nachoparker <nacho@ownyourbits.com>
1 parent 13e4208 commit 953c47a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

bin/ncp/BACKUPS/nc-rsync-auto.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ configure()
2828
return 1;
2929
}
3030

31+
# Check if the ssh access is properly configured. For this purpose the command : or echo is called remotely.
32+
# If one of the commands works, the test is successful.
3133
[[ "$DESTINATION" =~ : ]] && {
3234
local NET="$( sed 's|:.*||' <<<"$DESTINATION" )"
3335
local SSH=( ssh -o "BatchMode=yes" -p "$PORTNUMBER" "$NET" )
34-
${SSH[@]} : || { echo "SSH non-interactive not properly configured"; return 1; }
36+
${SSH[@]} echo || { echo "SSH non-interactive not properly configured"; return 1; }
3537
}
3638

3739
echo "0 5 */${SYNCDAYS} * * root /usr/bin/rsync -ax -e \"ssh -p $PORTNUMBER\" --delete \"$DATADIR\" \"$DESTINATION\"" > /etc/cron.d/ncp-rsync-auto

changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2-
[v1.20.1](https://github.com/nextcloud/nextcloudpi/commit/5fb675b) (2019-12-19) Revert "build: dont use empty values by default"
2+
[v1.20.2](https://github.com/nextcloud/nextcloudpi/commit/97cb2ff) (2019-11-13) Extend the ssh configuration check by calling the echo command if the first check fails.
3+
4+
[v1.20.1](https://github.com/nextcloud/nextcloudpi/commit/6d0bc6b) (2019-12-19) Revert "build: dont use empty values by default"
35

46
[v1.20.0 ](https://github.com/nextcloud/nextcloudpi/commit/f75c415) (2019-12-19) upgrade to NC17.0.2
57

0 commit comments

Comments
 (0)