Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
certman
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
IML Open Source
certman
Commits
beda3030
Commit
beda3030
authored
4 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
optional: force excecution with a given user only
parent
a5f17c4f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cm.sh
+14
-0
14 additions, 0 deletions
cm.sh
inc_config.sh.dist
+5
-0
5 additions, 0 deletions
inc_config.sh.dist
readme.md
+2
-2
2 additions, 2 deletions
readme.md
with
21 additions
and
2 deletions
cm.sh
+
14
−
0
View file @
beda3030
...
...
@@ -19,6 +19,7 @@
# 2021-03-12 <axel.hahn@iml.unibe.ch> create file for haproxy
# 2021-03-22 <axel.hahn@iml.unibe.ch> for haproxy: use chained cert instead of server cert
# 2021-04-12 <axel.hahn@iml.unibe.ch> reject multiple usage of fqdn in cli params
# 2021-04-12 <axel.hahn@iml.unibe.ch> optional: force excecution with a given user only
# ======================================================================
...
...
@@ -220,6 +221,18 @@ function _testStaging(){
fi
echo
}
# internal function; if a user was set as CM_user then verify it with
# current user
function
_testUser
(){
if
[
!
-z
"
$CM_user
"
]
;
then
local
_sUser
=
`
id
|
cut
-f
2
-d
"("
|
cut
-f
1
-d
")"
`
if
[[
$_sUser
!=
"
$CM_user
"
]]
;
then
echo
"ERROR: Run this script under user [
$CM_user
] - not as
$_sUser
."
exit
1
fi
fi
}
# set update message in a file
# param string(s) message
...
...
@@ -528,6 +541,7 @@ if [ $? -ne 0 ]; then
exit
1
fi
_testUser
_testStaging
test
-z
"
${
CM_diracme
}
"
&&
CM_diracme
=
./certs
...
...
This diff is collapsed.
Click to expand it.
inc_config.sh.dist
+
5
−
0
View file @
beda3030
...
...
@@ -43,4 +43,9 @@ export ACME=../acme.sh/acme.sh
# have no permission
# export CM_certmatch="\.example\.com"
# optional: force a user to execute cm.sh
# this is for a central installation with a software deployment
# like Ansible or puppet; default: none (=any user can run cm.sh)
# export CM_user="ansible"
# ----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
readme.md
+
2
−
2
View file @
beda3030
...
...
@@ -25,9 +25,9 @@ A suggested structure is having acme.sh and this wrapper below the same parent d
```
text
/opt/letsenecrypt/
|
+-- acm
s
.sh/
+-- acm
e
.sh/
| |
| + acm
s
.sh
| + acm
e
.sh
| + ...
|
+-- iml-certman/
...
...
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