1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/elasticsearch8_ynh.git synced 2024-09-03 18:26:26 +02:00

Fix LXC installation (fixes #41)

This commit is contained in:
JimboJoe 2024-08-23 20:42:19 +02:00
parent fca438c184
commit 5b703b5539
4 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ ynh_script_progression --message="Increasing maximum map count (sysctl)..."
# Increase the maximum number of files inotify can monitor.
cp -a ../conf/90-max_map_count-elasticsearch.conf /etc/sysctl.d/
# Then, reload the kernel configuration.
if ! [ "${container:-}" = "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
if ! [ "$(systemd-detect-virt)" == "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
then
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
fi

View file

@ -31,7 +31,7 @@ ynh_remove_logrotate
if [ -e "/etc/sysctl.d/90-max_map_count-elasticsearch.conf" ]; then
ynh_secure_remove --file="/etc/sysctl.d/90-max_map_count-elasticsearch.conf"
# Reload the kernel configuration.
if ! [ "${container:-}" = "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
if ! [ "$(systemd-detect-virt)" == "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
then
sysctl --system
fi

View file

@ -37,7 +37,7 @@ chown -R $app:www-data "$data_dir"
ynh_script_progression --message="Restoring various files..." --weight=1
ynh_restore_file --origin_path="/etc/sysctl.d/90-max_map_count-elasticsearch.conf"
if ! [ "${container:-}" = "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
if ! [ "$(systemd-detect-virt)" == "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
then
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
fi

View file

@ -65,7 +65,7 @@ ynh_script_progression --message="Increasing maximum map count (sysctl)..."
# Increase the maximum number of files inotify can monitor.
cp -a ../conf/90-max_map_count-elasticsearch.conf /etc/sysctl.d/
# Then, reload the kernel configuration.
if ! [ "${container:-}" = "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
if ! [ "$(systemd-detect-virt)" == "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
then
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
fi