Improvements to the init scripts

This commit is contained in:
Josh.5
2023-10-02 19:43:50 +13:00
parent ca7521d765
commit 8f32302c0f
16 changed files with 148 additions and 140 deletions

View File

@@ -1,26 +1,17 @@
#!/usr/bin/env bash
###
# File: 11-setup_sysctl_values.sh
# Project: cont-init.d
# File Created: Friday, 1st September 2023 3:56:17 pm
# Author: Josh.5 (jsunnex@gmail.com)
# -----
# Last Modified: Monday, 1st September 2023 3:56:17 pm
# Modified By: Console and webGui login account (jsunnex@gmail.com)
###
echo "**** Configure some system kernel parameters ****"
# Configure kernel parameters
print_header "Configure some system kernel parameters"
if [ "$(cat /proc/sys/vm/max_map_count)" -ge 524288 ]; then
if [ -w "/proc/sys/vm/max_map_count" ]; then
echo "Setting the maximum number of memory map areas a process can create to 524288"
print_step_header "Setting the maximum number of memory map areas a process can create to 524288"
echo 524288 > /proc/sys/vm/max_map_count
else
echo "WARNING: Unable to set max_map_count on unprivileged container"
print_warning "Unable to set vm.max_map_count on unprivileged container"
fi
else
echo "NOTE: vm.max_map_count is already greater than '524288'"
print_step_header "The vm.max_map_count is already greater than '524288'"
fi
echo "DONE"
echo -e "\e[34mDONE\e[0m"