Skip to content

Commit 30778bb

Browse files
committed
chore(sysctl): add fs.inotify.max_user_watches
1 parent 76e07e1 commit 30778bb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ function configure_os {
116116
if [ ! -n "$max_user_instances" ] || [ 65535 -gt $max_user_instances ] ;then
117117
echo 'fs.inotify.max_user_instances = 65535' >> /etc/sysctl.conf 2>/dev/null || true
118118
fi
119+
max_user_watches=$(sysctl -ne fs.inotify.max_user_watches)
120+
if [ ! -n "$max_user_watches" ] || [ 65535 -gt $max_user_watches ] ;then
121+
echo 'fs.inotify.max_user_watches = 65535' >> /etc/sysctl.conf 2>/dev/null || true
122+
fi
119123
sysctl -p 2>/dev/null || echo -e "\\033[33m---> Warning: sysctl -p failed, skipping (container environment?)\\033[0m"
120124

121125
cpufreq=$(ls /sys/devices/system/cpu/cpu*/cpufreq >/dev/null 2>&1 || echo "false")

0 commit comments

Comments
 (0)