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:
parent
fca438c184
commit
5b703b5539
4 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ ynh_script_progression --message="Increasing maximum map count (sysctl)..."
|
||||||
# Increase the maximum number of files inotify can monitor.
|
# Increase the maximum number of files inotify can monitor.
|
||||||
cp -a ../conf/90-max_map_count-elasticsearch.conf /etc/sysctl.d/
|
cp -a ../conf/90-max_map_count-elasticsearch.conf /etc/sysctl.d/
|
||||||
# Then, reload the kernel configuration.
|
# 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
|
then
|
||||||
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -31,7 +31,7 @@ ynh_remove_logrotate
|
||||||
if [ -e "/etc/sysctl.d/90-max_map_count-elasticsearch.conf" ]; then
|
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"
|
ynh_secure_remove --file="/etc/sysctl.d/90-max_map_count-elasticsearch.conf"
|
||||||
# Reload the kernel configuration.
|
# 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
|
then
|
||||||
sysctl --system
|
sysctl --system
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -37,7 +37,7 @@ chown -R $app:www-data "$data_dir"
|
||||||
ynh_script_progression --message="Restoring various files..." --weight=1
|
ynh_script_progression --message="Restoring various files..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/sysctl.d/90-max_map_count-elasticsearch.conf"
|
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
|
then
|
||||||
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -65,7 +65,7 @@ ynh_script_progression --message="Increasing maximum map count (sysctl)..."
|
||||||
# Increase the maximum number of files inotify can monitor.
|
# Increase the maximum number of files inotify can monitor.
|
||||||
cp -a ../conf/90-max_map_count-elasticsearch.conf /etc/sysctl.d/
|
cp -a ../conf/90-max_map_count-elasticsearch.conf /etc/sysctl.d/
|
||||||
# Then, reload the kernel configuration.
|
# 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
|
then
|
||||||
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue