Skip to content

Commit

Permalink
Let's encrypt add pre,post and renew hook scripts which could be used…
Browse files Browse the repository at this point in the history
… later in any other image
  • Loading branch information
drscream committed Jan 25, 2017
1 parent 319e334 commit 7e15d66
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion copy/opt/core/bin/ssl-letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ if ! certbot certonly \
exit 1
fi

# Create empty hook scripts by default
touch /opt/local/etc/letsencrypt/{pre,post,renew}-hook.sh
chmod 700 /opt/local/etc/letsencrypt/*-hook.sh

# Create cronjob to automatically check or renew the certificate two
# times a day
CRON='0 0,12 * * * /opt/local/bin/certbot renew --text --non-interactive --quiet'
CRON='0 0,12 * * * /opt/local/bin/certbot renew --text --non-interactive --quiet --pre-hook "/opt/local/etc/letsencrypt/pre-hook.sh" --post-hook "/opt/local/etc/letsencrypt/post-hook.sh" --renew-hook "/opt/local/etc/letsencrypt/renew-hook.sh"'
(crontab -l 2>/dev/null || true; echo "$CRON" ) | sort | uniq | crontab
2 changes: 1 addition & 1 deletion manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name="core-base"
organization="SkyLime"
brand="Instance"
version="16.4.4"
version="16.4.5"
description="Base core.io image"
homepage="https://github.com/skylime/mi-core-base"
users="root admin"
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core-base",
"version": "16.4.4",
"version": "16.4.5",
"description": "Base core.io image",
"organization": "SkyLime",
"brand": "Instance",
Expand Down

0 comments on commit 7e15d66

Please sign in to comment.