Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions addons/redis-server-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ phpenmod -v "$PHPVER" redis
install_if_not redis-server

## Redis performance tweaks ##
if ! grep -Fxq "vm.overcommit_memory = 1" /etc/sysctl.conf
then
echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf
fi
# /etc/sysctl.conf isn't read at boot on Ubuntu 26.04, so use sysctl.d
echo 'vm.overcommit_memory = 1' > /etc/sysctl.d/90-redis.conf
sysctl -w vm.overcommit_memory=1

# Disable THP
if ! grep -Fxq "never" /sys/kernel/mm/transparent_hugepage/enabled
Expand Down
8 changes: 4 additions & 4 deletions apps/smbmount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ If you choose 'yes', we will install a needed PHP-plugin, the files_inotify app
Please note, that this will need around 1 KB additional RAM per folder.
We will set the max folder variable to 524288 which will be around \
500 MB of additionally needed RAM if you have so many folders.
If you have more folders, you will need to raise this value manually inside '/etc/sysctl.conf'.
If you have more folders, you will need to raise this value manually inside '/etc/sysctl.d/90-inotify.conf'.
Please also note, that this max folder variable counts for \
all external storages for which the inotify option gets activated.
We please you to do the math yourself if the number is high enough for your setup."
Expand Down Expand Up @@ -380,11 +380,11 @@ We please you to do the math yourself if the number is high enough for your setu
# Set fs.inotify.max_user_watches to 524288
# https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached
# https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
if ! grep -q "fs.inotify.max_user_watches" /etc/sysctl.conf
if ! grep -qs "fs.inotify.max_user_watches" /etc/sysctl.d/90-inotify.conf
then
print_text_in_color "$ICyan" "Setting the max folder variable to 524288..."
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/90-inotify.conf
sudo sysctl -p /etc/sysctl.d/90-inotify.conf
fi

# Create syslog for files_inotify
Expand Down
6 changes: 3 additions & 3 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1762,15 +1762,15 @@ fi
}

set_max_count() {
if grep -F 'vm.max_map_count=512000' /etc/sysctl.conf ; then
# /etc/sysctl.conf isn't read at boot on Ubuntu 26.04, so use sysctl.d
if grep -Fqs 'vm.max_map_count=512000' /etc/sysctl.d/90-max_map_count.conf ; then
print_text_in_color "$ICyan" "Max map count already set, skipping..."
else
sysctl -w vm.max_map_count=512000
{
echo "###################################################################"
echo "# Docker ES max virtual memory"
echo "vm.max_map_count=512000"
} >> /etc/sysctl.conf
} > /etc/sysctl.d/90-max_map_count.conf
fi
}

Expand Down
6 changes: 6 additions & 0 deletions nextcloud_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,12 @@ else
fi
fi

# /etc/sysctl.conf isn't read at boot on Ubuntu 26.04, but older scripts saved settings there
if [ -f /etc/sysctl.conf ] && [ ! -e /etc/sysctl.d/99-sysctl.conf ]
then
ln -s ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
fi

# Remove APCu https://github.com/nextcloud/vm/issues/2039
if is_this_installed "php$PHPVER"-dev
then
Expand Down
8 changes: 4 additions & 4 deletions not-supported/smbserver.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鈿狅笍 [shellcheck] reported by reviewdog 馃惗
HASH appears unused. Verify use (or export if used externally). SC2034

local HASH

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鈿狅笍 [shellcheck] reported by reviewdog 馃惗
SELECTED_GROUPS appears unused. Verify use (or export if used externally). SC2034

local SELECTED_GROUPS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鈿狅笍 [shellcheck] reported by reviewdog 馃惗
NC_GROUPS appears unused. Verify use (or export if used externally). SC2034

local NC_GROUPS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鈿狅笍 [shellcheck] reported by reviewdog 馃惗
GROUP appears unused. Verify use (or export if used externally). SC2034

local GROUP

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鈿狅笍 [shellcheck] reported by reviewdog 馃惗
NEWNAME_BACKUP appears unused. Verify use (or export if used externally). SC2034

local NEWNAME_BACKUP

Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ If you choose 'yes', we will install a needed PHP-plugin, the files_inotify app
Please note, that this will need around 1 KB additional RAM per folder.
We will set the max folder variable to 524288 which will be around 500 MB \
of additionally needed RAM if you have so many folders.
If you have more folders, you will need to raise this value manually inside '/etc/sysctl.conf'.
If you have more folders, you will need to raise this value manually inside '/etc/sysctl.d/90-inotify.conf'.
Please also note, that this max folder variable counts for all \
external storages for which the inotify option gets activated.
We please you to do the math yourself if the number is high enough for your setup."
Expand Down Expand Up @@ -928,11 +928,11 @@ We please you to do the math yourself if the number is high enough for your setu
# Set fs.inotify.max_user_watches to 524288
# https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached
# https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
if ! grep -q "fs.inotify.max_user_watches" /etc/sysctl.conf
if ! grep -qs "fs.inotify.max_user_watches" /etc/sysctl.d/90-inotify.conf
then
print_text_in_color "$ICyan" "Setting the max folder variable to 524288..."
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/90-inotify.conf
sudo sysctl -p /etc/sysctl.d/90-inotify.conf
fi

# Create syslog for files_inotify
Expand Down
Loading