diff --git a/check_process b/check_process index 6fc1eed..aa03cb6 100644 --- a/check_process +++ b/check_process @@ -3,8 +3,8 @@ ; Manifest domain="domain.tld" path="/path" - admin="john" is_public=1 + admin="john" port="3000" ; Checks pkg_linter=1 @@ -15,6 +15,8 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=893b873f00c2f9793369b7cd5d034b06605aaa8a + # 8.3.3~ynh1 + upgrade=1 from_commit=993c3b904f558057de4278c1833448fc124e8626 backup_restore=1 multi_instance=0 port_already_use=1 diff --git a/manifest.json b/manifest.json index 94e1850..0a1db7b 100644 --- a/manifest.json +++ b/manifest.json @@ -38,14 +38,14 @@ "example": "/grafana", "default": "/grafana" }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", "default": false + }, + { + "name": "admin", + "type": "user" } ] } diff --git a/scripts/backup b/scripts/backup index 7ff261f..f3b6604 100644 --- a/scripts/backup +++ b/scripts/backup @@ -74,7 +74,7 @@ fi ynh_backup --src_path="/etc/influxdb" ynh_backup --src_path="/etc/$app" -ynh_backup --src_path="/var/lib/grafana/plugins" +ynh_backup --src_path="/var/lib/grafana/plugins" --not_mandatory #================================================= # BACKUP THE MYSQL DATABASE diff --git a/scripts/install b/scripts/install index 6be2207..7e06f80 100644 --- a/scripts/install +++ b/scripts/install @@ -25,8 +25,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/remove b/scripts/remove index 96a02d0..821bf0d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -27,7 +27,7 @@ db_user=$db_name # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status grafana-server >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=1 @@ -62,6 +62,9 @@ ynh_remove_app_dependencies #================================================= # SPECIFIC REMOVE #================================================= +# REMOVE VARIOUS FILES +#================================================= +ynh_script_progression --message="Removing various files..." # If NetData is installed, configure it not to feed InfluxDB any more netdata_conf="/opt/netdata/etc/netdata/netdata.conf" diff --git a/scripts/restore b/scripts/restore index 5aebe16..2477044 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,7 +76,7 @@ ynh_script_progression --message="Restoring various files..." --weight=2 ynh_restore_file --origin_path="/etc/influxdb" ynh_restore_file --origin_path="/etc/grafana" -ynh_restore_file --origin_path="/var/lib/grafana/plugins" +ynh_restore_file --origin_path="/var/lib/grafana/plugins" --not_mandatory #================================================= # RESTORE THE INFLUXDB DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index d75e109..a6bda64 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,6 +36,10 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=4 +# Workaround for missing "/var/lib/grafana/plugins" +mkdir -p "/var/lib/grafana/plugins" +chown -R $app:$app "/var/lib/grafana/plugins" + # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () {