pid=`ps -ef | grep "hugo server" | grep -v grep | awk '{print $2}'` if [ -n "$pid" ]; then echo "$pid will be killed" kill -9 $pid fi nohup hugo server -w -D --port 80 --bind 0.0.0.0 --baseURL=http://182.18.1.4:80/ &