Set HOME if it's not defined in certbot-auto (#4503)

* set HOME if it's not defined

* use ~root rather than /root
This commit is contained in:
Brad Warren
2017-04-17 14:39:08 -07:00
committed by GitHub
parent 2bdf8cf505
commit 36891033dd
2 changed files with 10 additions and 0 deletions
@@ -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