1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opensearch_ynh.git synced 2024-09-03 19:46:35 +02:00

Fix '$container' is unbound when not in LXC

This commit is contained in:
Florent 2023-01-17 14:51:56 +01:00 committed by Florent F
parent 71b792d3fa
commit d1c400312c
4 changed files with 4 additions and 4 deletions

View file

@ -116,7 +116,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-opensearch.conf /etc/sysctl.d/
# 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
sysctl -p /etc/sysctl.d/90-max_map_count-opensearch.conf
fi

View file

@ -113,7 +113,7 @@ ynh_script_progression --message="Removing various files..."
if [ -e "/etc/sysctl.d/90-max_map_count-opensearch.conf" ]; then
ynh_secure_remove --file="/etc/sysctl.d/90-max_map_count-opensearch.conf"
# 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
sysctl --system
fi

View file

@ -91,7 +91,7 @@ chown $app:$app "/run/$app"
ynh_script_progression --message="Restoring various files..."
ynh_restore_file --origin_path="/etc/sysctl.d/90-max_map_count-opensearch.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
sysctl -p /etc/sysctl.d/90-max_map_count-opensearch.conf
fi

View file

@ -120,7 +120,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-opensearch.conf /etc/sysctl.d/
# 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
sysctl -p /etc/sysctl.d/90-max_map_count-opensearch.conf
fi