[Compatibility] Use `$HOME` instead of hardcoding `/root`

This commit is contained in:
Alex Thomassen 2021-04-30 10:18:24 +02:00
parent b9cbe29516
commit f8005f80d9
Signed by: Alex
GPG Key ID: 10BD786B5F6FF5DE
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
. "/root/.acme.sh/acme.sh.env"
. "$HOME/.acme.sh/acme.sh.env"
export CF_Account_ID=""
export CF_Token=""

View File

@ -20,7 +20,7 @@ chmod -R 600 $SSL_BASE
# But I use zsh as the main shell
# Therefore I need a shared "environment file" that loads acme.sh
# And related environment variables
curl -L "$GIST/.acmeenv" > "/root/.acmeenv"
curl -L "$GIST/.acmeenv" > "$HOME/.acmeenv"
# Get the alias config for Let's Encrypt challenges:
curl -L "$GIST/letsencrypt.conf" > "$NGINX/letsencrypt.conf"
@ -36,7 +36,7 @@ curl -L "$GIST/phpfpm.conf" > "$NGINX/phpfpm.conf"
curl -L "$GIST/generate-dhparams.sh" | sudo bash
# Add to ZSH/Bash config files
echo '. "/root/.acmeenv"' >> "/root/.zshrc";
echo '. "/root/.acmeenv"' >> "/root/.bashrc";
echo '. "$HOME/.acmeenv"' >> "$HOME/.zshrc";
echo '. "$HOME/.acmeenv"' >> "$HOME/.bashrc";
echo "Base setup done. Open this link for a base nginx site configuration: $GIST/000-default.conf"