From d5212cd2751fd1aba11d8e62d34927b7f6712069 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 18 Sep 2021 17:55:46 +0200 Subject: [PATCH] Fix flows data file name --- scripts/upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 3806876..31fbcc9 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,6 +71,13 @@ if ynh_permission_exists --permission="admin"; then ynh_permission_create --permission="endpoints" --url="/" --allowed="visitors" --show_tile=false fi +# Flows were stored in file named after the hostname. +# Not very portable. Let's fix that. +if [ ! -f "$final_path/data/flows.json" ]; then + mv "$final_path/data/flows_$(hostname)_cred.json" "$final_path/data/flows_cred.json" + mv "$final_path/data/flows_$(hostname).json" "$final_path/data/flows.json" +fi + #================================================= # CLOSING PORT #=================================================