diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..36cba93 --- /dev/null +++ b/conf/app.src @@ -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 diff --git a/manifest.json b/manifest.json index 784699b..5e893e2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A monitoring tools", "fr": "Un outils de monitoring" }, - "version": "3.10.1~ynh2", + "version": "3.11.0~ynh1", "url": "http://monitorix.org", "license": "GPL-2.0", "maintainer": { @@ -14,7 +14,7 @@ "email": "josue@familletille.ch" }, "requirements": { - "yunohost": ">= 2.7.12" + "yunohost": ">= 3.4" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index cef47e9..c29e287 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -2,11 +2,7 @@ # SET ALL CONSTANTS #================================================= -## Adapt md5sum while you update app -sha256sum="a974dd05f67562de85ce4a994cec7f0dcbe3cadad2c5f305131e3867af33a7ad" - app=$YNH_APP_INSTANCE_NAME -APP_VERSION=$(ynh_app_upstream_version) #================================================= # DEFINE ALL COMMON FONCTIONS @@ -17,14 +13,10 @@ install_dependances() { } 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 - 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_package_install -f } @@ -57,4 +49,4 @@ set_permission() { chmod u=rX,g=rwX,o= -R /etc/monitorix chown www-data:root -R /var/lib/monitorix chmod u=rwX,g=rwX,o= -R /var/lib/monitorix -} \ No newline at end of file +}