Skip to content
Snippets Groups Projects
Unverified Commit f86a76e2 authored by rhatto's avatar rhatto
Browse files

Fix: check: non-zero exit status when there's a warning

parent 162944bc
Branches
Tags
No related merge requests found
...@@ -27,3 +27,8 @@ source "$LIB" maintenance $* || exit 1 ...@@ -27,3 +27,8 @@ source "$LIB" maintenance $* || exit 1
# This should be done here: # This should be done here:
# TODO: Check canaries' timestamps, warning by mail if configured by user preferences. # TODO: Check canaries' timestamps, warning by mail if configured by user preferences.
# Since this is the check action, it should exit whenever there's a warning
if [ "$KEYRINGER_HAS_EXPIRING_KEYS" == "1" ]; then
exit 1
fi
...@@ -766,6 +766,8 @@ function keyringer_check_expiration { ...@@ -766,6 +766,8 @@ function keyringer_check_expiration {
if [[ "$ahead" -gt "$expiry" ]] && [ "$BASENAME" == "check" ]; then if [[ "$ahead" -gt "$expiry" ]] && [ "$BASENAME" == "check" ]; then
echo "Warning: subkey from $recipient will expire soon, on `date --date="@$expiry"`" echo "Warning: subkey from $recipient will expire soon, on `date --date="@$expiry"`"
KEYRINGER_HAS_EXPIRING_KEYS="1"
fi fi
fi fi
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment