mirror of
https://github.com/YunoHost-Apps/elasticsearch7_ynh.git
synced 2024-09-03 18:26:25 +02:00
Fix manifest, detect when in LXC and bump to new version
This commit is contained in:
parent
de99a4c974
commit
9bf49e7ad0
6 changed files with 7 additions and 21 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "Distributed and RESTful search engine.",
|
||||
"fr": "Moteur de recherche RESTful."
|
||||
},
|
||||
"version": "7.17.8~ynh1",
|
||||
"version": "7.17.8~ynh2",
|
||||
"url": "https://github.com/elastic/elasticsearch",
|
||||
"upstream": {
|
||||
"license": "SSPL-1.0",
|
||||
|
@ -23,6 +23,7 @@
|
|||
"requirements": {
|
||||
"yunohost": ">= 11.0.0"
|
||||
},
|
||||
"services": [],
|
||||
"multi_instance": true,
|
||||
"arguments": {
|
||||
"install": []
|
||||
|
|
|
@ -7,14 +7,7 @@
|
|||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
IS_PACKAGE_CHECK () {
|
||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]
|
||||
then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -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-elasticsearch.conf /etc/sysctl.d/
|
||||
# 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
|
||||
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
||||
fi
|
||||
|
|
|
@ -75,14 +75,6 @@ fi
|
|||
ynh_script_progression --message="Removing pid directory..." --weight=1
|
||||
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
|
||||
#=================================================
|
||||
|
@ -113,7 +105,7 @@ ynh_script_progression --message="Removing various files..."
|
|||
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 ! 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
|
||||
sysctl --system
|
||||
fi
|
||||
|
|
|
@ -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-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
|
||||
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
||||
fi
|
||||
|
|
|
@ -99,7 +99,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 ! 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
|
||||
sysctl -p /etc/sysctl.d/90-max_map_count-elasticsearch.conf
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue