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

Delete 90-max_map_count-opensearch.conf when removing app

This commit is contained in:
Florent 2023-01-05 13:03:13 +01:00
parent 02d099337e
commit 1d75000b2c

View file

@ -103,6 +103,22 @@ ynh_script_progression --message="Removing the dedicated system user..." --weigh
# Delete a system user
ynh_system_user_delete --username=$app
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
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 ! IS_PACKAGE_CHECK # LXC doesn't allow sysctl to play with kernel options.
then
sysctl --system
fi
fi
#=================================================
# END OF SCRIPT
#=================================================