Skip to content

TLS CERT CADDY #2673

Oct 25, 2023 · 4 comments · 9 replies
Discussion options

You must be logged in to vote

while we maybe work out a better method here is a little guide on how to copy and keep certificates up to date.

Monitoring and Updating Postal Certificates

1. Install inotify-tools

Install the toolset which provides inotifywait, used to monitor certificate changes.

sudo apt-get update
sudo apt-get install inotify-tools

2. Create the Monitoring Script

Make a script named monitor_certs.sh:

nano /opt/postal/monitor_certs.sh

Insert the following code:

#!/bin/bash

CERT_DIR="/opt/postal/caddy-data/caddy/certificates/acme.zerossl.com-v2-dv90/YOURDOMAIN/"
CERT_FILE="${CERT_DIR}YOURDOMAIN.crt"
KEY_FILE="${CERT_DIR}YOURDOMAIN.key"

while true; do
    inotifywait -e modify "$CERT_FILE" "$KEY_FILE"

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
2 replies
@mredodos
Comment options

@willpower232
Comment options

Comment options

You must be logged in to vote
7 replies
@edellingham
Comment options

@vaztimur
Comment options

@mredodos
Comment options

@vaztimur
Comment options

@eagles051387
Comment options

Answer selected by mredodos
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants