Add timeout to volume unlock/mount
This commit is contained in:
parent
0617349573
commit
a5c0b46cd8
@ -8,7 +8,6 @@ What=/dev/mapper/lecrypt
|
|||||||
Where=/etc/letsencrypt
|
Where=/etc/letsencrypt
|
||||||
Type=ext4
|
Type=ext4
|
||||||
Options=rw,relatime
|
Options=rw,relatime
|
||||||
TimeoutSec=45
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
@ -17,6 +17,10 @@ fi
|
|||||||
|
|
||||||
echo "Copying Systemd units and drop-ins to system directory..."
|
echo "Copying Systemd units and drop-ins to system directory..."
|
||||||
$sudo cp $run_directory/etc-letsencrypt.mount /etc/systemd/system/
|
$sudo cp $run_directory/etc-letsencrypt.mount /etc/systemd/system/
|
||||||
|
if [ ! -d /etc/systemd/systemd-cryptsetup@lecrypt.service.d ]; then
|
||||||
|
$sudo mkdir /etc/systemd/system/systemd-cryptsetup@lecrypt.service.d
|
||||||
|
fi
|
||||||
|
$sudo cp $run_directory/timeout.conf /etc/systemd/system/systemd-cryptsetup@lecrypt/
|
||||||
if [ ! -d /etc/systemd/system/nginx.service.d ]; then
|
if [ ! -d /etc/systemd/system/nginx.service.d ]; then
|
||||||
$sudo mkdir /etc/systemd/system/nginx.service.d
|
$sudo mkdir /etc/systemd/system/nginx.service.d
|
||||||
fi
|
fi
|
||||||
@ -26,7 +30,7 @@ echo "Reloading Systemd..."
|
|||||||
$sudo systemctl daemon-reload
|
$sudo systemctl daemon-reload
|
||||||
echo "Enabling etc-letsencrypt.mount..."
|
echo "Enabling etc-letsencrypt.mount..."
|
||||||
$sudo systemctl enable etc-letsencrypt.mount
|
$sudo systemctl enable etc-letsencrypt.mount
|
||||||
# WARNING you should enable this mount (and keep nginx.service enabled) if your volume does not unlock automatically
|
# WARNING you should enable this mount (and keep nginx.service disabled) if your volume does not unlock automatically
|
||||||
|
|
||||||
echo "Finished install. Exiting..."
|
echo "Finished install. Exiting..."
|
||||||
exit 0
|
exit 0
|
||||||
|
2
timeout.conf
Normal file
2
timeout.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Unit]
|
||||||
|
JobTimeoutSec=30
|
Reference in New Issue
Block a user