Fix manifest, detect when in LXC and bump to new version

This commit is contained in:
Florent 2023-01-05 17:38:27 +01:00
parent de99a4c974
commit 9bf49e7ad0
6 changed files with 7 additions and 21 deletions

View file

@ -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~ynh1", "version": "7.17.8~ynh2",
"url": "https://github.com/elastic/elasticsearch", "url": "https://github.com/elastic/elasticsearch",
"upstream": { "upstream": {
"license": "SSPL-1.0", "license": "SSPL-1.0",
@ -23,6 +23,7 @@
"requirements": { "requirements": {
"yunohost": ">= 11.0.0" "yunohost": ">= 11.0.0"
}, },
"services": [],
"multi_instance": true, "multi_instance": true,
"arguments": { "arguments": {
"install": [] "install": []

View file

@ -7,14 +7,7 @@
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================
IS_PACKAGE_CHECK () {
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]
then
return 0
else
return 1
fi
}
#================================================= #=================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================

View file

@ -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 ! IS_PACKAGE_CHECK # 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

View file

@ -75,14 +75,6 @@ fi
ynh_script_progression --message="Removing pid directory..." --weight=1 ynh_script_progression --message="Removing pid directory..." --weight=1
ynh_secure_remove --file="/run/$app" ynh_secure_remove --file="/run/$app"
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#================================================= #=================================================
# CLOSE A PORT # CLOSE A PORT
#================================================= #=================================================
@ -113,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 ! IS_PACKAGE_CHECK # 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

View file

@ -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 ! IS_PACKAGE_CHECK # 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

View file

@ -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 ! IS_PACKAGE_CHECK # 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