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

Remove unneded experimental helper and update requirement

This commit is contained in:
Josué Tille 2024-04-26 23:47:57 +02:00
parent e2b0e14719
commit baa95866d4
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5
2 changed files with 1 additions and 28 deletions

View file

@ -20,7 +20,7 @@ code = "https://github.com/mikaku/Monitorix"
cpe = "cpe:2.3:a:fibranet:monitorix" cpe = "cpe:2.3:a:fibranet:monitorix"
[integration] [integration]
yunohost = ">= 11.0.11" yunohost = ">= 11.2.11"
architectures = "all" architectures = "all"
multi_instance = false multi_instance = false
ldap = "not_relevant" ldap = "not_relevant"

View file

@ -133,30 +133,3 @@ ynh_add_jinja_config() {
) )
ynh_store_file_checksum --file="$destination" ynh_store_file_checksum --file="$destination"
} }
# Check either a package is installed or not
#
# example: ynh_package_is_installed --package=yunohost && echo "installed"
#
# usage: ynh_package_is_installed --package=name [--wait_dpkg_free]
# | arg: -p, --package= - the package name to check
# | arg: -l, --wait_dpkg_free= - wait for dpkg to be free.
# | Note that waiting on dpkg free could take about 0.2s on quick platform
# | and about 2 seconds on slow platform so in case of multiple call it could be slow
# | ret: 0 if the package is installed, 1 else.
ynh_package_is_installed() {
# Declare an array to define the options of this helper.
local legacy_args=pl
local -A args_array=([p]=package= [l]=wait_dpkg_free=)
local package
local wait_dpkg_free
# Manage arguments with getopts
ynh_handle_getopts_args "$@"
wait_dpkg_free="${wait_dpkg_free:-0}"
if [ "$wait_dpkg_free" -eq 1 ]; then
ynh_wait_dpkg_free
fi
dpkg-query --show --showformat='${Status}' "$package" 2>/dev/null \
| grep --count "ok installed" &>/dev/null
}