5 offbold=$(tput rmso;tput sgr0)
8 #echo "1 is $1 2 is $2"
14 curr_len=`expr length "$1"`
15 let space_length=$2-$curr_len
17 while [ $count -lt $space_length ]
26 echo $(curl -I "$1" 2>/dev/null|head -1|tail -1|awk '{print $2}')
29 options=($(ls -l $dirName/releases|grep ^d|awk '{print $NF}'|sort))
30 echo "$(pad RELEASE 15)$(pad URL 30)$(pad Status 10)"
31 echo "$(pad '----' 15)$(pad '---' 30)$(pad '------' 10)"
32 for opt in "${options[@]}"
36 if [ -e "./releases/${opt}/customSettings.js" ]
38 pid=$(cat ./releases/$releaseDir/logs/process_pid 2>/dev/null)
39 port=$(cat ./releases/$releaseDir/customSettings.js 2>/dev/null|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2)
40 resp1=$(isRunning "http://localhost:$port")
41 if [ "$resp1" == "401" ]
43 echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad running 10)${offbold}"
45 processId=$(netstat -upltn 2>/dev/null|grep $port|awk '{print $NF}'|sed -e 's%/node-red%%g')
46 if [ "$processId" == "" ]
48 echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad stopped 10)${offbold}"
50 echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad running 10)${offbold}"