mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:41:53 +02:00
Merge pull request #3155 from gdoucet/master
Added the argument --quiet and -q so then when used with a regular user there is no output to the screen.
This commit is contained in:
@@ -34,6 +34,7 @@ Help for certbot itself cannot be provided until it is installed.
|
|||||||
-n, --non-interactive, --noninteractive run without asking for user input
|
-n, --non-interactive, --noninteractive run without asking for user input
|
||||||
--no-self-upgrade do not download updates
|
--no-self-upgrade do not download updates
|
||||||
--os-packages-only install OS dependencies and exit
|
--os-packages-only install OS dependencies and exit
|
||||||
|
-q, --quiet provide only update/error output
|
||||||
-v, --verbose provide more output
|
-v, --verbose provide more output
|
||||||
|
|
||||||
All arguments are accepted and forwarded to the Certbot client when run."
|
All arguments are accepted and forwarded to the Certbot client when run."
|
||||||
@@ -52,15 +53,19 @@ for arg in "$@" ; do
|
|||||||
HELP=1;;
|
HELP=1;;
|
||||||
--noninteractive|--non-interactive)
|
--noninteractive|--non-interactive)
|
||||||
ASSUME_YES=1;;
|
ASSUME_YES=1;;
|
||||||
|
--quiet)
|
||||||
|
QUIET=1;;
|
||||||
--verbose)
|
--verbose)
|
||||||
VERBOSE=1;;
|
VERBOSE=1;;
|
||||||
-[!-]*)
|
-[!-]*)
|
||||||
while getopts ":hnv" short_arg $arg; do
|
while getopts ":hnvq" short_arg $arg; do
|
||||||
case "$short_arg" in
|
case "$short_arg" in
|
||||||
h)
|
h)
|
||||||
HELP=1;;
|
HELP=1;;
|
||||||
n)
|
n)
|
||||||
ASSUME_YES=1;;
|
ASSUME_YES=1;;
|
||||||
|
q)
|
||||||
|
QUIET=1;;
|
||||||
v)
|
v)
|
||||||
VERBOSE=1;;
|
VERBOSE=1;;
|
||||||
esac
|
esac
|
||||||
@@ -927,9 +932,11 @@ UNLIKELY_EOF
|
|||||||
fi
|
fi
|
||||||
if [ -n "$SUDO" ]; then
|
if [ -n "$SUDO" ]; then
|
||||||
# SUDO is su wrapper or sudo
|
# SUDO is su wrapper or sudo
|
||||||
|
if [ "$QUIET" != 1 ]; then
|
||||||
echo "Requesting root privileges to run certbot..."
|
echo "Requesting root privileges to run certbot..."
|
||||||
echo " $VENV_BIN/letsencrypt" "$@"
|
echo " $VENV_BIN/letsencrypt" "$@"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [ -z "$SUDO_ENV" ] ; then
|
if [ -z "$SUDO_ENV" ] ; then
|
||||||
# SUDO is su wrapper / noop
|
# SUDO is su wrapper / noop
|
||||||
$SUDO "$VENV_BIN/letsencrypt" "$@"
|
$SUDO "$VENV_BIN/letsencrypt" "$@"
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Help for certbot itself cannot be provided until it is installed.
|
|||||||
-n, --non-interactive, --noninteractive run without asking for user input
|
-n, --non-interactive, --noninteractive run without asking for user input
|
||||||
--no-self-upgrade do not download updates
|
--no-self-upgrade do not download updates
|
||||||
--os-packages-only install OS dependencies and exit
|
--os-packages-only install OS dependencies and exit
|
||||||
|
-q, --quiet provide only update/error output
|
||||||
-v, --verbose provide more output
|
-v, --verbose provide more output
|
||||||
|
|
||||||
All arguments are accepted and forwarded to the Certbot client when run."
|
All arguments are accepted and forwarded to the Certbot client when run."
|
||||||
@@ -52,15 +53,19 @@ for arg in "$@" ; do
|
|||||||
HELP=1;;
|
HELP=1;;
|
||||||
--noninteractive|--non-interactive)
|
--noninteractive|--non-interactive)
|
||||||
ASSUME_YES=1;;
|
ASSUME_YES=1;;
|
||||||
|
--quiet)
|
||||||
|
QUIET=1;;
|
||||||
--verbose)
|
--verbose)
|
||||||
VERBOSE=1;;
|
VERBOSE=1;;
|
||||||
-[!-]*)
|
-[!-]*)
|
||||||
while getopts ":hnv" short_arg $arg; do
|
while getopts ":hnvq" short_arg $arg; do
|
||||||
case "$short_arg" in
|
case "$short_arg" in
|
||||||
h)
|
h)
|
||||||
HELP=1;;
|
HELP=1;;
|
||||||
n)
|
n)
|
||||||
ASSUME_YES=1;;
|
ASSUME_YES=1;;
|
||||||
|
q)
|
||||||
|
QUIET=1;;
|
||||||
v)
|
v)
|
||||||
VERBOSE=1;;
|
VERBOSE=1;;
|
||||||
esac
|
esac
|
||||||
@@ -262,9 +267,11 @@ UNLIKELY_EOF
|
|||||||
fi
|
fi
|
||||||
if [ -n "$SUDO" ]; then
|
if [ -n "$SUDO" ]; then
|
||||||
# SUDO is su wrapper or sudo
|
# SUDO is su wrapper or sudo
|
||||||
|
if [ "$QUIET" != 1 ]; then
|
||||||
echo "Requesting root privileges to run certbot..."
|
echo "Requesting root privileges to run certbot..."
|
||||||
echo " $VENV_BIN/letsencrypt" "$@"
|
echo " $VENV_BIN/letsencrypt" "$@"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [ -z "$SUDO_ENV" ] ; then
|
if [ -z "$SUDO_ENV" ] ; then
|
||||||
# SUDO is su wrapper / noop
|
# SUDO is su wrapper / noop
|
||||||
$SUDO "$VENV_BIN/letsencrypt" "$@"
|
$SUDO "$VENV_BIN/letsencrypt" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user