From a73295d6dec3e588d6db9fa1313a1551e7fa059d Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 3 Sep 2022 19:04:01 +0200 Subject: [PATCH] Fix restoration --- scripts/restore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 2394b76..4a04cfb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -80,7 +80,9 @@ ynh_restore_file --origin_path="/var/lib/grafana/plugins" --not_mandatory # Set permission with the new grafana user (id could have been changed) chown -R root:grafana "/etc/grafana" -chown -R grafana:grafana "/var/lib/grafana/plugins" +if [ -d "/var/lib/grafana/plugins" ]; then + chown -R grafana:grafana "/var/lib/grafana/plugins" +fi #================================================= # RESTORE THE INFLUXDB DATABASE