From db8c2dbcb24a7212adbb064838a024b0763a918c Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Mon, 25 Dec 2023 02:25:59 +0000 Subject: [PATCH] Linux tweak --- .../universal/run_before_05-system.sh.tmpl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_before_05-system.sh.tmpl b/home/.chezmoiscripts/universal/run_before_05-system.sh.tmpl index 55c0a121..4044dc4d 100644 --- a/home/.chezmoiscripts/universal/run_before_05-system.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_before_05-system.sh.tmpl @@ -236,9 +236,12 @@ ensureUserGroup() { # increasing the `vm.max_map_count`. According to a [RedHat article](https://access.redhat.com/solutions/99913), the default value is `65530`. # This function increases that value to `262144` if `sysctl` is available on the system. increaseMapCount() { - if command -v sysctl > /dev/null; then - logg info 'Increasing vm.max_map_count size to 262144' - sudo sysctl -w vm.max_map_count=262144 > /dev/null + if [ ! -d /Applications ] && [ ! -d /System ]; then + ### Linux + if command -v sysctl > /dev/null; then + logg info 'Increasing vm.max_map_count size to 262144' + sudo sysctl -w vm.max_map_count=262144 > /dev/null + fi fi }