mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
wait signal
This commit is contained in:
parent
fa38e05331
commit
b0d4ef8dfd
@ -69,6 +69,7 @@ cat /dev/null > $OUT_LOG
|
||||
|
||||
$pm2 sendSignal SIGUSR2 signal.js
|
||||
|
||||
sleep 1
|
||||
OUT=`grep "SIGUSR2" "$OUT_LOG" | wc -l`
|
||||
[ $OUT -eq 2 ] || fail "Signal not received by the process name"
|
||||
success "Processes sucessfully receives the signal"
|
||||
@ -77,6 +78,8 @@ $pm2 stop signal.js
|
||||
|
||||
# Send a process by id
|
||||
$pm2 start signal.js
|
||||
|
||||
sleep 1
|
||||
# get the log file and the id.
|
||||
OUT_LOG=`$pm2 prettylist | grep -m 1 -E "pm_out_log_path:" | sed "s/.*'\([^']*\)',/\1/"`
|
||||
ID=`$pm2 prettylist | grep -E "pm_id:" | sed "s/.*pm_id: \([^,]*\),/\1/"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user