mirror of
https://github.com/YunoHost-Apps/elasticsearch7_ynh.git
synced 2024-09-03 18:26:25 +02:00
Fix '$container' is unbound when not in LXC
This commit is contained in:
parent
357762c7ea
commit
d6f2102777
5 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
||||||
"en": "Distributed and RESTful search engine",
|
"en": "Distributed and RESTful search engine",
|
||||||
"fr": "Moteur de recherche RESTful"
|
"fr": "Moteur de recherche RESTful"
|
||||||
},
|
},
|
||||||
"version": "7.17.8~ynh4",
|
"version": "7.17.8~ynh5",
|
||||||
"url": "https://github.com/elastic/elasticsearch",
|
"url": "https://github.com/elastic/elasticsearch",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "SSPL-1.0",
|
"license": "SSPL-1.0",
|
||||||
|
|
|
@ -116,7 +116,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 ! [ "${container:-}" = "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
|
||||||
|
|
|
@ -105,7 +105,7 @@ ynh_script_progression --message="Removing various files..."
|
||||||
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 ! [ "${container:-}" = "lxc" ] # lxc doesn't allow sysctl to play with kernel options.
|
||||||
then
|
then
|
||||||
sysctl --system
|
sysctl --system
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -91,7 +91,7 @@ chown $app:$app "/run/$app"
|
||||||
ynh_script_progression --message="Restoring various files..."
|
ynh_script_progression --message="Restoring various files..."
|
||||||
|
|
||||||
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 ! [ "${container:-}" = "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
|
||||||
|
|
|
@ -99,7 +99,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 ! [ "${container:-}" = "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…
Reference in a new issue