Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
unknowndevQwQ committed Mar 26, 2020
1 parent a6e780b commit fd880b4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# acme.sh-systemd
systemd service for automatic Let's Encrypt(for acme.sh)renewals
systemd service for automatic Let's Encrypt(for acme.sh) renewals
The timer unit should be enabled.

How to use

mkdir -pm 0700 "/{etc,var/log}/acme.sh"

add LOG_FILE='/var/log/acme.sh/acme.sh.log'

acme.sh --home /etc/acme.sh command ...[parameters]....
12 changes: 12 additions & 0 deletions acme.sh.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Renew Let's Encrypt Certificates
After=network.target network-online.target nss-lookup.target
Wants=network-online.target nss-lookup.target
[Service]
# If the version of systemd is 240 or above, then uncommenting Type=simple and commenting out Type=exec
#Type=exec
Type=simple
User=root
ExecStart=/usr/bin/acme.sh --cron --home /etc/acme.sh
Restart=on-failure
9 changes: 9 additions & 0 deletions acme.sh.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Bimonthly check for acme.sh(Let's Encrypt) renewals

[Timer]
OnCalendar=*-1/2-01 00:00:00
Persistent=yes

[Install]
WantedBy=timers.target

0 comments on commit fd880b4

Please sign in to comment.