mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00: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
|
|
@ -147,7 +147,7 @@ if ! [ -f "$DATADIR/PG_VERSION" ] && ! [ -f "$DUMP_FILE" ]; then
|
|||
fi
|
||||
|
||||
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))
|
||||
if [ -n "$MAX_CONNECTIONS" ]; then
|
||||
sed -i "s|^max_connections =.*|max_connections = $MAX_CONNECTIONS|" "/var/lib/postgresql/data/postgresql.conf"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue