Index: install.sh =================================================================== diff -u -r60917f804ec0b4529a21d4724f422fdafd2135e1 -re41432def6e55460024cbe0b682d774b1ca478ba --- install.sh (.../install.sh) (revision 60917f804ec0b4529a21d4724f422fdafd2135e1) +++ install.sh (.../install.sh) (revision e41432def6e55460024cbe0b682d774b1ca478ba) @@ -174,17 +174,17 @@ "\n" \ "function is_running() {\n" \ " if [[ -n \$(ps aux | grep \"node dist\" | grep -v grep) ]]\n" \ - " then return $TRUE; else return $FALSE; fi\n" \ + " then return 0; else return 1; fi\n" \ "}\n" \ "\n" \ "function is_kill() {\n" \ " if [[ \"\$1\" == \"-k\" ]]\n" \ - " then return $TRUE; else return $FALSE; fi\n" \ + " then return 0; else return 1; fi\n" \ "}\n" \ "\n" \ "function is_status() {\n" \ " if [[ \"\$1\" == \"-s\" ]]\n" \ - " then return $TRUE; else return $FALSE; fi\n" \ + " then return 0; else return 1; fi\n" \ "}\n" \ "\n" \ "function is_help() {\n" \ @@ -193,6 +193,7 @@ " echo \"-h displays help\"\n" \ " echo \"-s displays DRT Server status (optional)\"\n" \ " echo \"-k kills DRT Server\"\n" \ + " echo \"-l displays DRT Server log\"\n" \ " exit 0\n" \ " fi\n" \ "}\n" \ @@ -212,6 +213,8 @@ " exit 0\n" \ " else\n" \ " echo \"--------------------------------------- DRT Server is running\"\n" \ + " if is_status \$1; then exit 0; fi\n" \ + " tail -f ~/drt.log\n" \ " exit 0\n" \ " fi\n" \ "else\n" \ @@ -223,7 +226,7 @@ "\n" \ "echo \"--------------------------------------- DRT Server starting ...\"\n" \ "cd /home/denali/drt-server\n" \ - "node dist/apps/mt-api/main.js &\n" \ + "node dist/apps/mt-api/main.js > ~/drt.log &\n" \ "sleep 10\n" \ "if is_running; then\n" \ " echo \"--------------------------------------- DRT Server started\"\n" \