mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 08:03:10 +02:00
fix sh compatibility
This commit is contained in:
+6
-5
@@ -15,12 +15,13 @@ VENV_BIN=${VENV_PATH}/bin
|
|||||||
|
|
||||||
if test "`id -u`" -ne "0" ; then
|
if test "`id -u`" -ne "0" ; then
|
||||||
if ! type sudo &>/dev/null; then
|
if ! type sudo &>/dev/null; then
|
||||||
function sudo (){
|
sudo() {
|
||||||
args=("$@")
|
args=""
|
||||||
for i in "${!args[@]}"; do
|
while [ $# -ne 0 ]; do
|
||||||
args[$i]="'$(printf "%s" "${args[$i]}" | sed -e "s/'/'\"'\"'/g")' "
|
args="$args'$(printf "%s" "$1" | sed -e "s/'/'\"'\"'/g")' "
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
su root -c "${args[*]}"
|
su root -c "$args"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
SUDO=sudo
|
SUDO=sudo
|
||||||
|
|||||||
Reference in New Issue
Block a user