mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
Fix upgrade script
This commit is contained in:
parent
b39f2d81b0
commit
07c1cd0f2e
2 changed files with 6 additions and 3 deletions
|
@ -5,14 +5,14 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
## Adapt md5sum while you update app
|
## Adapt md5sum while you update app
|
||||||
sha256sum="3fb8b4a4f7aeeeafccc6dc5b232f82d5761be80fe8e82008bc768f805fe5a744"
|
sha256sum="3fb8b4a4f7aeeeafccc6dc5b232f82d5761be80fe8e82008bc768f805fe5a744"
|
||||||
|
|
||||||
get_app_version_from_json() {
|
ynh_app_version() {
|
||||||
manifest_path="../manifest.json"
|
manifest_path="../manifest.json"
|
||||||
if [ ! -e "$manifest_path" ]; then
|
if [ ! -e "$manifest_path" ]; then
|
||||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
||||||
fi
|
fi
|
||||||
echo $(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file.
|
echo $(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file.
|
||||||
}
|
}
|
||||||
APP_VERSION=$(get_app_version_from_json)
|
APP_VERSION=$(ynh_app_version)
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -18,6 +18,9 @@ dbuser=$app
|
||||||
dbname=$app
|
dbname=$app
|
||||||
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
|
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
|
||||||
|
|
||||||
|
# Stop services
|
||||||
|
systemctl stop monitorix.service
|
||||||
|
|
||||||
# Download package and install it
|
# Download package and install it
|
||||||
get_install_source
|
get_install_source
|
||||||
|
|
||||||
|
@ -28,4 +31,4 @@ config_nginx
|
||||||
config_monitorix
|
config_monitorix
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
systemctl restart monitorix.service
|
systemctl start monitorix.service
|
||||||
|
|
Loading…
Add table
Reference in a new issue