Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70212da3cb | ||
|
|
168cf9db15 |
@@ -61,7 +61,8 @@ function parseLog()
|
|||||||
if [ "${logger}" = "systemd" ]; then
|
if [ "${logger}" = "systemd" ]; then
|
||||||
# 2022-11-18T20:04:08+0900
|
# 2022-11-18T20:04:08+0900
|
||||||
auth_date=$(echo "${line}" | cut -d " " -f 1);
|
auth_date=$(echo "${line}" | cut -d " " -f 1);
|
||||||
auth_user=$(echo "${line}" | cut -d "]" -f 2 | cut -d " " -f 7 | cut -d "." -f 1);
|
# Note, instead of cut with dot, remove last dot in line
|
||||||
|
auth_user=$(echo "${line}" | cut -d "]" -f 2 | cut -d " " -f 7 | sed -e "s/\.$//");
|
||||||
else
|
else
|
||||||
auth_date=$(echo "${line}" | cut -c 1-6)" ${start_year} "$(echo "${line}" | cut -c 8-15);
|
auth_date=$(echo "${line}" | cut -c 1-6)" ${start_year} "$(echo "${line}" | cut -c 8-15);
|
||||||
auth_user=$(echo "${line}" | cut -d ")" -f 2 | cut -d " " -f 6 | cut -d "(" -f 1);
|
auth_user=$(echo "${line}" | cut -d ")" -f 2 | cut -d " " -f 6 | cut -d "(" -f 1);
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ while read i; do
|
|||||||
else
|
else
|
||||||
create_output_file="${ROOT_FOLDER}${output_file}.TEST";
|
create_output_file="${ROOT_FOLDER}${output_file}.TEST";
|
||||||
fi;
|
fi;
|
||||||
echo $(date +"%F %T")";"${host}";"${_hostname}";"${username}";"${password}";"${ssh_allow_type} >> ${create_output_file};
|
echo $(date +"%F %T")";"${host}";"${_hostname}";"${username}";"${password}";"${ssh_access_type} >> ${create_output_file};
|
||||||
# create folder only if we do not have central
|
# create folder only if we do not have central
|
||||||
# create the SSH foler and authorized access file with correct permissions
|
# create the SSH foler and authorized access file with correct permissions
|
||||||
if [ -z "${SSH_CENTRAL_AUTHORIZED_FILE_FOLDER}" ]; then
|
if [ -z "${SSH_CENTRAL_AUTHORIZED_FILE_FOLDER}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user