#!/bin/bash cd /root/dev-web source /etc/profile /usr/local/node-8.11.1/bin/npm i && EGG_SERVER_ENV=dev npm run devstart sleep 5 nodeport=` netstat -lntp|grep "7000"|awk '{print $4}'|awk -F":" '{print $4}'` echo $nodeport if [ "$nodeport" ];then echo -e " 33[32m[ node process start success on dev env ! ] 33[0m" fi