Ignore shellcheck errors in admin ssh keys, fix test ssh connection
ssh without -n or </dev/null will eat all input from the while read loop This stopped the tests in the test ssh connection to be run see man ssh for the -n option
This commit is contained in:
@@ -34,6 +34,7 @@ if [ ! -f "${CONFIG_BASE}settings.ini" ]; then
|
||||
exit;
|
||||
fi
|
||||
# shellcheck source=../config/settings.ini
|
||||
# shellcheck disable=SC1094
|
||||
source <(grep "=" "${CONFIG_BASE}settings.ini" | sed 's/ *= */=/g')
|
||||
if [ -z "${key_age}" ]; then
|
||||
echo "A minimnum key age in days must be set in the settings";
|
||||
@@ -49,7 +50,7 @@ if [ ! -f "${CONFIG_BASE}${server_list}" ]; then
|
||||
exit;
|
||||
fi
|
||||
|
||||
SSH="ssh -a -x";
|
||||
SSH="ssh -a -x -n";
|
||||
# date command
|
||||
datecmd="date";
|
||||
if date --version 2>&1 | grep -qi "date: illegal option"; then
|
||||
@@ -92,7 +93,7 @@ while read -r line; do
|
||||
rotate_date="";
|
||||
if [ -f "${LAST_ROTATE}${hostname}_${username}.last-rotate" ]; then
|
||||
# load last rotate timestamp and get YYYY-MM-DD
|
||||
rotate_date=$(${datecmd} -d @"$(cat "${LAST_ROTATE}${hostname}_${username}.last-rotate")" +%F);
|
||||
rotate_date=$(${datecmd} -d "@$(cat "${LAST_ROTATE}${hostname}_${username}.last-rotate")" +%F);
|
||||
fi
|
||||
# check for diff in username / hostname
|
||||
warning_string=""
|
||||
|
||||
Reference in New Issue
Block a user