Don't saying you're requesting root unless you really are

This commit is contained in:
Brad Warren
2016-05-17 20:11:02 -07:00
parent 502eba1cc4
commit 507b154276
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -898,8 +898,11 @@ UNLIKELY_EOF
fi
echo "Installation succeeded."
fi
echo "Requesting root privileges to run certbot..."
echo " $VENV_BIN/letsencrypt" "$@"
if [ -n "$SUDO" ]; then
# SUDO is su wrapper or sudo
echo "Requesting root privileges to run certbot..."
echo " $VENV_BIN/letsencrypt" "$@"
fi
if [ -z "$SUDO_ENV" ] ; then
# SUDO is su wrapper / noop
$SUDO "$VENV_BIN/letsencrypt" "$@"