mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-11-11 06:30:49 +08:00
Switch from mawk to built-in awk
Signed-off-by: Anth0rx <pascal@dengconsult.systems>
This commit is contained in:
parent
27d99efebf
commit
a51d43c074
4 changed files with 3 additions and 4 deletions
|
|
@ -184,7 +184,6 @@ RUN set -ex; \
|
||||||
git \
|
git \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
tzdata \
|
tzdata \
|
||||||
mawk \
|
|
||||||
sudo \
|
sudo \
|
||||||
grep \
|
grep \
|
||||||
nodejs \
|
nodejs \
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ redis.session.lock_wait_time = 10000
|
||||||
REDIS_CONF
|
REDIS_CONF
|
||||||
|
|
||||||
echo "Setting php max children..."
|
echo "Setting php max children..."
|
||||||
MEMORY=$(mawk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
MEMORY=$(awk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
||||||
PHP_MAX_CHILDREN=$((MEMORY/50))
|
PHP_MAX_CHILDREN=$((MEMORY/50))
|
||||||
if [ -n "$PHP_MAX_CHILDREN" ]; then
|
if [ -n "$PHP_MAX_CHILDREN" ]; then
|
||||||
sed -i "s/^pm.max_children =.*/pm.max_children = $PHP_MAX_CHILDREN/" /usr/local/etc/php-fpm.d/www.conf
|
sed -i "s/^pm.max_children =.*/pm.max_children = $PHP_MAX_CHILDREN/" /usr/local/etc/php-fpm.d/www.conf
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||||
COPY --chmod=775 init-user-db.sh /docker-entrypoint-initdb.d/init-user-db.sh
|
COPY --chmod=775 init-user-db.sh /docker-entrypoint-initdb.d/init-user-db.sh
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk add --no-cache bash openssl shadow grep mawk; \
|
apk add --no-cache bash openssl shadow grep; \
|
||||||
\
|
\
|
||||||
# We need to use the same gid and uid as on old installations
|
# We need to use the same gid and uid as on old installations
|
||||||
deluser postgres; \
|
deluser postgres; \
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ if ! [ -f "$DATADIR/PG_VERSION" ] && ! [ -f "$DUMP_FILE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Setting max connections..."
|
echo "Setting max connections..."
|
||||||
MEMORY=$(mawk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
MEMORY=$(awk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
||||||
MAX_CONNECTIONS=$((MEMORY/50+3))
|
MAX_CONNECTIONS=$((MEMORY/50+3))
|
||||||
if [ -n "$MAX_CONNECTIONS" ]; then
|
if [ -n "$MAX_CONNECTIONS" ]; then
|
||||||
sed -i "s|^max_connections =.*|max_connections = $MAX_CONNECTIONS|" "/var/lib/postgresql/data/postgresql.conf"
|
sed -i "s|^max_connections =.*|max_connections = $MAX_CONNECTIONS|" "/var/lib/postgresql/data/postgresql.conf"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue