Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/docker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitHub Workflow <workflow@github.com>2022-09-06 19:46:19 +0300
committerGitHub Workflow <workflow@github.com>2022-09-06 19:46:19 +0300
commitb30812dea9e0abd4499d81a6eaef2f23136f79b8 (patch)
tree61144eeccdf3e6e563b92e4c9d5dcfdcb94bb0a8
parent19256cdbf8c579a1487b6254d85d10fa9f75a940 (diff)
Runs update.sh
-rwxr-xr-x23/apache/entrypoint.sh27
-rwxr-xr-x23/fpm-alpine/entrypoint.sh27
-rwxr-xr-x23/fpm/entrypoint.sh27
-rwxr-xr-x24/apache/entrypoint.sh27
-rwxr-xr-x24/fpm-alpine/entrypoint.sh27
-rwxr-xr-x24/fpm/entrypoint.sh27
6 files changed, 150 insertions, 12 deletions
diff --git a/23/apache/entrypoint.sh b/23/apache/entrypoint.sh
index 7dac0df..1e3d438 100755
--- a/23/apache/entrypoint.sh
+++ b/23/apache/entrypoint.sh
@@ -13,7 +13,7 @@ directory_empty() {
run_as() {
if [ "$(id -u)" = 0 ]; then
- su -p www-data -s /bin/sh -c "$1"
+ su -p "$user" -s /bin/sh -c "$1"
else
sh -c "$1"
fi
@@ -50,6 +50,29 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
+ uid="$(id -u)"
+ gid="$(id -g)"
+ if [ "$uid" = '0' ]; then
+ case "$1" in
+ apache2*)
+ user="${APACHE_RUN_USER:-www-data}"
+ group="${APACHE_RUN_GROUP:-www-data}"
+
+ # strip off any '#' symbol ('#1000' is valid syntax for Apache)
+ pound='#'
+ user="${user#$pound}"
+ group="${group#$pound}"
+ ;;
+ *) # php-fpm
+ user='www-data'
+ group='www-data'
+ ;;
+ esac
+ else
+ user="$uid"
+ group="$gid"
+ fi
+
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
@@ -97,7 +120,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
- rsync_options="-rlDog --chown www-data:root"
+ rsync_options="-rlDog --chown $user:$group"
else
rsync_options="-rlD"
fi
diff --git a/23/fpm-alpine/entrypoint.sh b/23/fpm-alpine/entrypoint.sh
index 7dac0df..1e3d438 100755
--- a/23/fpm-alpine/entrypoint.sh
+++ b/23/fpm-alpine/entrypoint.sh
@@ -13,7 +13,7 @@ directory_empty() {
run_as() {
if [ "$(id -u)" = 0 ]; then
- su -p www-data -s /bin/sh -c "$1"
+ su -p "$user" -s /bin/sh -c "$1"
else
sh -c "$1"
fi
@@ -50,6 +50,29 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
+ uid="$(id -u)"
+ gid="$(id -g)"
+ if [ "$uid" = '0' ]; then
+ case "$1" in
+ apache2*)
+ user="${APACHE_RUN_USER:-www-data}"
+ group="${APACHE_RUN_GROUP:-www-data}"
+
+ # strip off any '#' symbol ('#1000' is valid syntax for Apache)
+ pound='#'
+ user="${user#$pound}"
+ group="${group#$pound}"
+ ;;
+ *) # php-fpm
+ user='www-data'
+ group='www-data'
+ ;;
+ esac
+ else
+ user="$uid"
+ group="$gid"
+ fi
+
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
@@ -97,7 +120,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
- rsync_options="-rlDog --chown www-data:root"
+ rsync_options="-rlDog --chown $user:$group"
else
rsync_options="-rlD"
fi
diff --git a/23/fpm/entrypoint.sh b/23/fpm/entrypoint.sh
index 7dac0df..1e3d438 100755
--- a/23/fpm/entrypoint.sh
+++ b/23/fpm/entrypoint.sh
@@ -13,7 +13,7 @@ directory_empty() {
run_as() {
if [ "$(id -u)" = 0 ]; then
- su -p www-data -s /bin/sh -c "$1"
+ su -p "$user" -s /bin/sh -c "$1"
else
sh -c "$1"
fi
@@ -50,6 +50,29 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
+ uid="$(id -u)"
+ gid="$(id -g)"
+ if [ "$uid" = '0' ]; then
+ case "$1" in
+ apache2*)
+ user="${APACHE_RUN_USER:-www-data}"
+ group="${APACHE_RUN_GROUP:-www-data}"
+
+ # strip off any '#' symbol ('#1000' is valid syntax for Apache)
+ pound='#'
+ user="${user#$pound}"
+ group="${group#$pound}"
+ ;;
+ *) # php-fpm
+ user='www-data'
+ group='www-data'
+ ;;
+ esac
+ else
+ user="$uid"
+ group="$gid"
+ fi
+
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
@@ -97,7 +120,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
- rsync_options="-rlDog --chown www-data:root"
+ rsync_options="-rlDog --chown $user:$group"
else
rsync_options="-rlD"
fi
diff --git a/24/apache/entrypoint.sh b/24/apache/entrypoint.sh
index 7dac0df..1e3d438 100755
--- a/24/apache/entrypoint.sh
+++ b/24/apache/entrypoint.sh
@@ -13,7 +13,7 @@ directory_empty() {
run_as() {
if [ "$(id -u)" = 0 ]; then
- su -p www-data -s /bin/sh -c "$1"
+ su -p "$user" -s /bin/sh -c "$1"
else
sh -c "$1"
fi
@@ -50,6 +50,29 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
+ uid="$(id -u)"
+ gid="$(id -g)"
+ if [ "$uid" = '0' ]; then
+ case "$1" in
+ apache2*)
+ user="${APACHE_RUN_USER:-www-data}"
+ group="${APACHE_RUN_GROUP:-www-data}"
+
+ # strip off any '#' symbol ('#1000' is valid syntax for Apache)
+ pound='#'
+ user="${user#$pound}"
+ group="${group#$pound}"
+ ;;
+ *) # php-fpm
+ user='www-data'
+ group='www-data'
+ ;;
+ esac
+ else
+ user="$uid"
+ group="$gid"
+ fi
+
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
@@ -97,7 +120,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
- rsync_options="-rlDog --chown www-data:root"
+ rsync_options="-rlDog --chown $user:$group"
else
rsync_options="-rlD"
fi
diff --git a/24/fpm-alpine/entrypoint.sh b/24/fpm-alpine/entrypoint.sh
index 7dac0df..1e3d438 100755
--- a/24/fpm-alpine/entrypoint.sh
+++ b/24/fpm-alpine/entrypoint.sh
@@ -13,7 +13,7 @@ directory_empty() {
run_as() {
if [ "$(id -u)" = 0 ]; then
- su -p www-data -s /bin/sh -c "$1"
+ su -p "$user" -s /bin/sh -c "$1"
else
sh -c "$1"
fi
@@ -50,6 +50,29 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
+ uid="$(id -u)"
+ gid="$(id -g)"
+ if [ "$uid" = '0' ]; then
+ case "$1" in
+ apache2*)
+ user="${APACHE_RUN_USER:-www-data}"
+ group="${APACHE_RUN_GROUP:-www-data}"
+
+ # strip off any '#' symbol ('#1000' is valid syntax for Apache)
+ pound='#'
+ user="${user#$pound}"
+ group="${group#$pound}"
+ ;;
+ *) # php-fpm
+ user='www-data'
+ group='www-data'
+ ;;
+ esac
+ else
+ user="$uid"
+ group="$gid"
+ fi
+
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
@@ -97,7 +120,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
- rsync_options="-rlDog --chown www-data:root"
+ rsync_options="-rlDog --chown $user:$group"
else
rsync_options="-rlD"
fi
diff --git a/24/fpm/entrypoint.sh b/24/fpm/entrypoint.sh
index 7dac0df..1e3d438 100755
--- a/24/fpm/entrypoint.sh
+++ b/24/fpm/entrypoint.sh
@@ -13,7 +13,7 @@ directory_empty() {
run_as() {
if [ "$(id -u)" = 0 ]; then
- su -p www-data -s /bin/sh -c "$1"
+ su -p "$user" -s /bin/sh -c "$1"
else
sh -c "$1"
fi
@@ -50,6 +50,29 @@ if expr "$1" : "apache" 1>/dev/null; then
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
+ uid="$(id -u)"
+ gid="$(id -g)"
+ if [ "$uid" = '0' ]; then
+ case "$1" in
+ apache2*)
+ user="${APACHE_RUN_USER:-www-data}"
+ group="${APACHE_RUN_GROUP:-www-data}"
+
+ # strip off any '#' symbol ('#1000' is valid syntax for Apache)
+ pound='#'
+ user="${user#$pound}"
+ group="${group#$pound}"
+ ;;
+ *) # php-fpm
+ user='www-data'
+ group='www-data'
+ ;;
+ esac
+ else
+ user="$uid"
+ group="$gid"
+ fi
+
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
@@ -97,7 +120,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
- rsync_options="-rlDog --chown www-data:root"
+ rsync_options="-rlDog --chown $user:$group"
else
rsync_options="-rlD"
fi