mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 13:37:02 +01:00
IMP(shellcheck): refactor continue (SC2104)
This commit is contained in:
parent
addd48c4dd
commit
ef800954f4
@ -27,8 +27,7 @@ audit() {
|
|||||||
does_file_exist $FILE
|
does_file_exist $FILE
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE does not exist"
|
crit "$FILE does not exist"
|
||||||
continue
|
else
|
||||||
fi
|
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
if [ "$FNRET" = 0 ]; then
|
if [ "$FNRET" = 0 ]; then
|
||||||
ok "$FILE has correct ownership"
|
ok "$FILE has correct ownership"
|
||||||
@ -41,6 +40,7 @@ audit() {
|
|||||||
else
|
else
|
||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will be called if the script status is on enabled mode
|
# This function will be called if the script status is on enabled mode
|
||||||
|
@ -27,8 +27,7 @@ audit() {
|
|||||||
does_file_exist $FILE
|
does_file_exist $FILE
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE does not exist"
|
crit "$FILE does not exist"
|
||||||
continue
|
else
|
||||||
fi
|
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
if [ "$FNRET" = 0 ]; then
|
if [ "$FNRET" = 0 ]; then
|
||||||
ok "$FILE has correct ownership"
|
ok "$FILE has correct ownership"
|
||||||
@ -41,6 +40,7 @@ audit() {
|
|||||||
else
|
else
|
||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will be called if the script status is on enabled mode
|
# This function will be called if the script status is on enabled mode
|
||||||
|
@ -27,8 +27,7 @@ audit() {
|
|||||||
does_file_exist $FILE
|
does_file_exist $FILE
|
||||||
if [ "$FNRET" != 0 ]; then
|
if [ "$FNRET" != 0 ]; then
|
||||||
crit "$FILE does not exist"
|
crit "$FILE does not exist"
|
||||||
continue
|
else
|
||||||
fi
|
|
||||||
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
|
||||||
if [ "$FNRET" = 0 ]; then
|
if [ "$FNRET" = 0 ]; then
|
||||||
ok "$FILE has correct ownership"
|
ok "$FILE has correct ownership"
|
||||||
@ -41,6 +40,7 @@ audit() {
|
|||||||
else
|
else
|
||||||
crit "$FILE permissions were not set to $PERMISSIONS"
|
crit "$FILE permissions were not set to $PERMISSIONS"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will be called if the script status is on enabled mode
|
# This function will be called if the script status is on enabled mode
|
||||||
|
Loading…
Reference in New Issue
Block a user