mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
Use app version from manifest
This commit is contained in:
parent
16f7951681
commit
cb28a2f77f
1 changed files with 10 additions and 2 deletions
|
@ -4,7 +4,15 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
## Adapt md5sum while you update app
|
## Adapt md5sum while you update app
|
||||||
sha256sum="3fb8b4a4f7aeeeafccc6dc5b232f82d5761be80fe8e82008bc768f805fe5a744"
|
sha256sum="3fb8b4a4f7aeeeafccc6dc5b232f82d5761be80fe8e82008bc768f805fe5a744"
|
||||||
monitorix_version="3.10.0"
|
|
||||||
|
get_app_version_from_json() {
|
||||||
|
manifest_path="../manifest.json"
|
||||||
|
if [ ! -e "$manifest_path" ]; then
|
||||||
|
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
||||||
|
fi
|
||||||
|
echo $(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file.
|
||||||
|
}
|
||||||
|
APP_VERSION=$(get_app_version_from_json)
|
||||||
|
|
||||||
install_dependances() {
|
install_dependances() {
|
||||||
ynh_install_app_dependencies rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl pflogsumm
|
ynh_install_app_dependencies rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl pflogsumm
|
||||||
|
@ -15,7 +23,7 @@ install_dependances() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_source() {
|
get_source() {
|
||||||
wget -q -O '/tmp/monitorix.deb' "http://www.monitorix.org/monitorix_${monitorix_version}-izzy1_all.deb"
|
wget -q -O '/tmp/monitorix.deb' "http://www.monitorix.org/monitorix_${APP_VERSION}-izzy1_all.deb"
|
||||||
|
|
||||||
if [[ ! -e '/tmp/monitorix.deb' ]] || [[ $(sha256sum '/tmp/monitorix.deb' | cut -d' ' -f1) != $sha256sum ]]
|
if [[ ! -e '/tmp/monitorix.deb' ]] || [[ $(sha256sum '/tmp/monitorix.deb' | cut -d' ' -f1) != $sha256sum ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Reference in a new issue