Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit files for automatic SSL certificate imports #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions startup-scripts/unifi_ssl_import.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# unifi_ssl_import.service
#
# Usage: copy to (e.g.) /etc/systemd/system/unifi_ssl_import.service
# systemctl enable unifi_ssl_import.service
# systemctl start unifi_ssl_import.service
# systemctl status unifi_ssl_import.service
#
[Unit]
Description= UniFi Controller SSL Certificate Import
Documentation= https://www.stevejenkins.com/blog/2016/06/use-existing-ssl-certificate-linux-unifi-controller/

[Service]
Type= simple
User=

ExecStart= /usr/local/bin/unifi_ssl_import.sh

[Install]
WantedBy= unifi.service
20 changes: 20 additions & 0 deletions startup-scripts/unifi_ssl_import.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unifi_ssl_import.timer
#
# Usage: copy to (e.g.) /etc/systemd/system/unifi_ssl_import.timer
# systemctl enable unifi_ssl_import.timer
# systemctl start unifi_ssl_import.timer
# systemctl status unifi_ssl_import.timer
#
# Note: Update the OnCalendar entries to about five minutes past when
# Let's Encrypt's certbot runs
# (c.f. /etc/systemd/system/snap.certbot.renew.timer)
[Unit]
Description=Timer import renewed certificates for UniFi controller

[Timer]
Unit=unifi_ssl_import.service
OnCalendar=*-*-* 02:08
OnCalendar=*-*-* 12:37

[Install]
WantedBy=timers.target