杀掉制定端口的命令
This commit is contained in:
+2
-1
@@ -15,7 +15,8 @@ chown -R www:www ./
|
|||||||
echo "npm run docs:preview"
|
echo "npm run docs:preview"
|
||||||
|
|
||||||
# 杀掉之前运行的进程
|
# 杀掉之前运行的进程
|
||||||
ps -ef | grep "npm run docs:preview" | grep -v grep | awk '{print $2}' | xargs kill -9
|
#ps -ef | grep "npm run docs:preview" | grep -v grep | awk '{print $2}' | xargs kill -9
|
||||||
|
netstat -tulpn | grep :1234 | awk '{print $7}' | cut -d '/' -f1 | xargs kill -9
|
||||||
|
|
||||||
# 以 www 身份后台运行,忽略挂断信号,输出重定向到日志
|
# 以 www 身份后台运行,忽略挂断信号,输出重定向到日志
|
||||||
nohup sudo -u www npm run docs:preview > /www/wwwroot/xsinfo/preview.log 2>&1 &
|
nohup sudo -u www npm run docs:preview > /www/wwwroot/xsinfo/preview.log 2>&1 &
|
||||||
Reference in New Issue
Block a user