Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rcfiles
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
nimrod
rcfiles
Commits
f210c7d1
Commit
f210c7d1
authored
8 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Added renew_certs script (renews certs from Let's encrypt, provisions and restarts services).
parent
405debf4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documents/Shore/renew_certs
+29
-0
29 additions, 0 deletions
Documents/Shore/renew_certs
with
29 additions
and
0 deletions
Documents/Shore/renew_certs
0 → 100755
+
29
−
0
View file @
f210c7d1
#!/bin/sh
set
-eu
echo
Renew cert
for
shore.co.il,www.shore.co.il.
ssh ns1.shore.co.il
'sudo letsencrypt certonly --webroot --webroot-path /var/www/htdocs/www.shore.co.il -d shore.co.il,www.shore.co.il'
echo
Reload Nginx.
ssh ns1.shore.co.il
'sudo /etc/rc.d/nginx reload'
echo
Renew cert
for
imap.shore.co.il,smtp.shore.co.il.
ssh ns1.shore.co.il
'sudo letsencrypt certonly --webroot --webroot-path /var/www/htdocs/mail.shore.co.il/ -d imap.shore.co.il,smtp.shore.co.il'
echo
Copy private key to imap container.
ssh ns1.shore.co.il
'sudo cat /etc/letsencrypt/live/imap.shore.co.il/privkey.pem'
| ssh host01.shore.co.il
'cat | sudo tee /var/lib/lxc/imap/rootfs/etc/dovecot/private/dovecot.key'
>
/dev/null
echo
Copy cert to imap container.
ssh ns1.shore.co.il
'sudo cat /etc/letsencrypt/live/imap.shore.co.il/cert.pem'
| ssh host01.shore.co.il
'cat | sudo tee /var/lib/lxc/imap/rootfs/etc/dovecot/private/dovecot.crt'
>
/dev/null
echo
Restart Dovecot.
ssh host01.shore.co.il
'sudo lxc-attach --name imap -- service dovecot restart'
echo
Copy private key to smtp container.
ssh ns1.shore.co.il
'sudo cat /etc/letsencrypt/live/imap.shore.co.il/privkey.pem'
| ssh host01.shore.co.il
'cat | sudo tee /var/lib/lxc/smtp/rootfs/etc/exim4/exim.key'
>
/dev/null
echo
Copy cert to smtp container.
ssh ns1.shore.co.il
'sudo cat /etc/letsencrypt/live/imap.shore.co.il/cert.pem'
| ssh host01.shore.co.il
'cat | sudo tee /var/lib/lxc/smtp/rootfs/etc/exim4/exim.crt'
>
/dev/null
echo
Restart Exim.
ssh host01.shore.co.il
'sudo lxc-attach --name smtp -- service exim4 restart'
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