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