Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Warren <bmw@users.noreply.github.com>2017-04-18 00:39:08 +0300
committerGitHub <noreply@github.com>2017-04-18 00:39:08 +0300
commit36891033dd13737943ab548d8138be125b6e4a57 (patch)
tree58b83c68fac3b68709880d822da6b956738d82ab /letsencrypt-auto-source/letsencrypt-auto
parent2bdf8cf505ee8f26b4cbc591bae1b5fd6f602af5 (diff)
Set HOME if it's not defined in certbot-auto (#4503)
* set HOME if it's not defined * use ~root rather than /root
Diffstat (limited to 'letsencrypt-auto-source/letsencrypt-auto')
-rwxr-xr-xletsencrypt-auto-source/letsencrypt-auto5
1 files changed, 5 insertions, 0 deletions
diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto
index 8bc4bb112..41cbf2ec0 100755
--- a/letsencrypt-auto-source/letsencrypt-auto
+++ b/letsencrypt-auto-source/letsencrypt-auto
@@ -15,6 +15,11 @@ set -e # Work even if somebody does "sh thisscript.sh".
# Note: you can set XDG_DATA_HOME or VENV_PATH before running this script,
# if you want to change where the virtual environment will be installed
+
+# HOME might not be defined when being run through something like systemd
+if [ -z "$HOME" ]; then
+ HOME=~root
+fi
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME=~/.local/share
fi