From a7c442eac172ebef4f9598c9c45c211ff43a7080 Mon Sep 17 00:00:00 2001 From: qo-op Date: Mon, 1 Mar 2021 02:25:27 +0100 Subject: [PATCH] zenity error for non xbian user --- zen/new_file_in_astroport.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zen/new_file_in_astroport.sh b/zen/new_file_in_astroport.sh index 12c68ec..46dea86 100755 --- a/zen/new_file_in_astroport.sh +++ b/zen/new_file_in_astroport.sh @@ -50,7 +50,11 @@ else fi # File is placed in ROOT ~/astroport ? -[[ $PREFIX == "" ]] && echo "WARNING. $TYPE is root file UNTREATED" && exit 1 +if [[ $PREFIX == "" ]] +then + [[ "$USER" != "xbian" ]] && zenity --warning --width 300 --text "Désolé votre fichier ne peut pas être traité" + echo "WARNING. $TYPE is root file UNTREATED" && exit 1 +fi echo "ADDING ${path}${file} to IPFS and create ${PREFIX}ASTRXBIAN INDEX" echo "~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN"