Update to match new setup
This commit is contained in:
parent
e4e79cc531
commit
0617349573
@ -6,7 +6,7 @@ instance running (for web remote access if need be). We must manually unlock cer
|
|||||||
### Files
|
### Files
|
||||||
* `etc-letsencrypt.mount` allows to unlock and mount encrypted certificates volume.
|
* `etc-letsencrypt.mount` allows to unlock and mount encrypted certificates volume.
|
||||||
* Relevant information should be added to `/etc/crypttab`.
|
* Relevant information should be added to `/etc/crypttab`.
|
||||||
* `etc-letsencrypt.timer` is a timer to automatically start previous unit, **but this is currently not used**.
|
* Make sure that `/etc/letsencrypt` directory exists
|
||||||
* `wait-for-dns.conf` is a drop-in Systemd unit file, which prevents nginx to start before DNS server is operational.
|
* `wait-for-dns.conf` is a drop-in Systemd unit file, which prevents nginx to start before DNS server is operational.
|
||||||
#### Installation
|
#### Installation
|
||||||
* `install.sh` script copies Systemd files to their destination.
|
* `install.sh` script copies Systemd files to their destination.
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
# ALERT nginx.service must NOT be enabled
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Mount Let's Encrypt data directory
|
Description=Mount Let's Encrypt data directory
|
||||||
Wants=systemd-cryptsetup@lecrypt.service
|
Wants=systemd-cryptsetup@lecrypt.service
|
||||||
After=systemd-cryptsetup@lecrypt.service network.target
|
After=systemd-cryptsetup@lecrypt.service
|
||||||
|
|
||||||
[Mount]
|
[Mount]
|
||||||
What=/dev/mapper/lecrypt
|
What=/dev/mapper/lecrypt
|
||||||
@ -10,3 +9,6 @@ Where=/etc/letsencrypt
|
|||||||
Type=ext4
|
Type=ext4
|
||||||
Options=rw,relatime
|
Options=rw,relatime
|
||||||
TimeoutSec=45
|
TimeoutSec=45
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
# WARNING not used in current setup
|
|
||||||
[Unit]
|
|
||||||
Description=Try to mount letsencrypt certs after boot
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
Unit=etc-letsencrypt.mount
|
|
||||||
OnBootSec=30
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
@ -24,8 +24,9 @@ $sudo cp $run_directory/wait-for-dns.conf /etc/systemd/system/nginx.service.d/
|
|||||||
|
|
||||||
echo "Reloading Systemd..."
|
echo "Reloading Systemd..."
|
||||||
$sudo systemctl daemon-reload
|
$sudo systemctl daemon-reload
|
||||||
echo "Disabling nginx..."
|
echo "Enabling etc-letsencrypt.mount..."
|
||||||
$sudo systemctl disable nginx
|
$sudo systemctl enable etc-letsencrypt.mount
|
||||||
|
# WARNING you should enable this mount (and keep nginx.service enabled) if your volume does not unlock automatically
|
||||||
|
|
||||||
echo "Finished install. Exiting..."
|
echo "Finished install. Exiting..."
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user