Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
keyringer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rhatto
keyringer
Commits
f86a76e2
Unverified
Commit
f86a76e2
authored
5 months ago
by
rhatto
Browse files
Options
Downloads
Patches
Plain Diff
Fix: check: non-zero exit status when there's a warning
parent
162944bc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/keyringer/actions/check
+5
-0
5 additions, 0 deletions
lib/keyringer/actions/check
lib/keyringer/functions
+2
-0
2 additions, 0 deletions
lib/keyringer/functions
with
7 additions
and
0 deletions
lib/keyringer/actions/check
+
5
−
0
View file @
f86a76e2
...
@@ -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
This diff is collapsed.
Click to expand it.
lib/keyringer/functions
+
2
−
0
View file @
f86a76e2
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment