Skip to content

Commit

Permalink
chore: 增加一个取消所有进程的命令
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Feb 25, 2023
1 parent 7174f11 commit ee0f564
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"scripts": {
"dev": "node scripts/dev.js",
"kill": "bash scripts/kill-all.sh",
"sync-aliyun": "bash scripts/sync-aliyuncs.sh",
"build:test": "act -j test --secret-file=.env",
"webhook": "node scripts/webhook.js",
Expand Down
5 changes: 5 additions & 0 deletions scripts/kill-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
netstat -nptl | grep 3000 | awk '{print $7}' | awk -F"/" '{print $1}' | xargs kill -9
netstat -nptl | grep 3001 | awk '{print $7}' | awk -F"/" '{print $1}' | xargs kill -9
netstat -nptl | grep 3002 | awk '{print $7}' | awk -F"/" '{print $1}' | xargs kill -9
netstat -nptl | grep 8360 | awk '{print $7}' | awk -F"/" '{print $1}' | xargs kill -9

0 comments on commit ee0f564

Please sign in to comment.