A change to the script today by @dceejay (?) commenting out lines 816 to 821 has an error: The fi at line 821 should not be commented out; it leaves if at line 806 unterminated - at least if the indentation is reliable!:
806 if [ ! -f $file ]; then
807 echo " - You can customise the initial settings by running:"
808 echo " "
809 echo " node-red admin init"
810 echo " "
811 echo " - After running Node-RED for the first time, change the ownership of the settings"
812 echo " file to 'root' to prevent unauthorised changes:"
813 echo " "
814 echo " sudo chown root:root ~/.node-red/settings.js"
815 echo " "
816 # elif ! [[ $(stat --format '%G' ~/.node-red/settings.js) = "root" ]]; then
817 # echo " - Change the ownership of its settings file to 'root' to prevent unauthorised changes:"
818 # echo ""
819 # echo " sudo chown root:root ~/.node-red/settings.js"
820 # echo " "
821 # fi
822 if [ "$EUID" == "0" ]; then
823 echo " - Do not run Node-RED as root or an administraive account"
824 echo " "
825 fi
826 echo "**********************************************************************************"
A work-around till it's fixed:
download the script, edit it and run it locally