Merge pull request #198 from nupplaphil/bug/sh_2

Replace su with gosu
(self-merging to accelerate the docker image fixup)
pull/202/head^2
Philipp 2022-02-16 21:46:53 +01:00 zatwierdzone przez GitHub
commit 102d52108b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
10 zmienionych plików z 30 dodań i 40 usunięć

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter

Wyświetl plik

@ -3,12 +3,11 @@ set -eu
# run an command with the www-data user
run_as() {
set -- -c "cd /var/www/html; $*"
set -- sh -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}; export PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}; $1"
else
sh -c "$1"
set -- gosu www-data "$@"
fi
"$@"
}
# checks if the the first parameter is greater than the second parameter