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

Upgrade to 4.11.0 and use ynh_setup_source

This commit is contained in:
Josué Tille 2019-04-07 08:38:08 +02:00
parent 7a37532fd6
commit 6f94630a0d
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
3 changed files with 22 additions and 13 deletions

17
conf/app.src Normal file
View file

@ -0,0 +1,17 @@
SOURCE_URL=http://www.monitorix.org/monitorix_3.11.0-izzy1_all.deb
SOURCE_SUM=64e1b170bd57ae4c8338a6a59a92551a59f2874702327a2b8e2caf983ffd3585
# (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256
SOURCE_SUM_PRG=sha256sum
# (Optional) Archive format
# default: tar.gz
SOURCE_FORMAT=deb
# (Optional) Put false if sources are directly in the archive root
# default: true
# Instead of true, SOURCE_IN_SUBDIR could be the number of sub directories
# to remove.
SOURCE_IN_SUBDIR=false
# (Optional) If it set as false don't extract the source.
# (Useful to get a debian package or a python wheel.)
# default: true
SOURCE_EXTRACT=false

View file

@ -6,7 +6,7 @@
"en": "A monitoring tools", "en": "A monitoring tools",
"fr": "Un outils de monitoring" "fr": "Un outils de monitoring"
}, },
"version": "3.10.1~ynh2", "version": "3.11.0~ynh1",
"url": "http://monitorix.org", "url": "http://monitorix.org",
"license": "GPL-2.0", "license": "GPL-2.0",
"maintainer": { "maintainer": {
@ -14,7 +14,7 @@
"email": "josue@familletille.ch" "email": "josue@familletille.ch"
}, },
"requirements": { "requirements": {
"yunohost": ">= 2.7.12" "yunohost": ">= 3.4"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [

View file

@ -2,11 +2,7 @@
# SET ALL CONSTANTS # SET ALL CONSTANTS
#================================================= #=================================================
## Adapt md5sum while you update app
sha256sum="a974dd05f67562de85ce4a994cec7f0dcbe3cadad2c5f305131e3867af33a7ad"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
APP_VERSION=$(ynh_app_upstream_version)
#================================================= #=================================================
# DEFINE ALL COMMON FONCTIONS # DEFINE ALL COMMON FONCTIONS
@ -17,14 +13,10 @@ install_dependances() {
} }
get_install_source() { get_install_source() {
wget -q -O '/tmp/monitorix.deb' "http://www.monitorix.org/monitorix_${APP_VERSION}-izzy1_all.deb" ynh_setup_source /tmp
if [[ ! -e '/tmp/monitorix.deb' ]] || [[ $(sha256sum '/tmp/monitorix.deb' | cut -d' ' -f1) != $sha256sum ]]
then
ynh_die "Error : can't get monitorix debian package"
fi
ynh_package_update ynh_package_update
dpkg --force-confdef --force-confold -i /tmp/monitorix.deb dpkg --force-confdef --force-confold -i /tmp/app.deb
ynh_secure_remove /etc/monitorix/conf.d/00-debian.conf ynh_secure_remove /etc/monitorix/conf.d/00-debian.conf
ynh_package_install -f ynh_package_install -f
} }
@ -57,4 +49,4 @@ set_permission() {
chmod u=rX,g=rwX,o= -R /etc/monitorix chmod u=rX,g=rwX,o= -R /etc/monitorix
chown www-data:root -R /var/lib/monitorix chown www-data:root -R /var/lib/monitorix
chmod u=rwX,g=rwX,o= -R /var/lib/monitorix chmod u=rwX,g=rwX,o= -R /var/lib/monitorix
} }