Skip to content

Commit

Permalink
disable auto dump on stop [#1035 #1055]
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Feb 29, 2016
1 parent 942649f commit f2714c7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/scripts/pm2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ start() {
stop() {
ebegin "Stopping PM2"

super $PM2 dump
#super $PM2 dump
super $PM2 delete all
super $PM2 kill

Expand Down
28 changes: 14 additions & 14 deletions lib/scripts/pm2-freebsd.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/bin/sh

. /etc/rc.subr

name=pm2
rcvar=${name}_enable

load_rc_config $name

: ${pm2_user="%USER%"}

command="%PM2_PATH%"
pidfile="/home/${pm2_user}/.pm2/${name}.pid"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
reload_cmd="${name}_reload"
status_cmd="${name}_status"

extra_commands="reload"

super() {
su - "${pm2_user}" -c "$*"
}

pm2_start() {
unset "${rc_flags}_cmd"
if pm2_running; then
Expand All @@ -31,23 +31,23 @@ pm2_start() {
super $command resurrect
fi
}

pm2_stop() {
echo "Stopping ${name}..."
super $command dump
#super $command dump
super $command delete all
super $command kill
}

pm2_reload() {
echo "Reloading ${name}"
super $command reload all
}

pm2_status() {
super $command list
}

pm2_running() {
process_id=$(pgrep -F ${pidfile})
if [ "${process_id}" -gt 0 ]; then
Expand All @@ -56,5 +56,5 @@ pm2_running() {
return 1
fi
}

run_rc_command "$1"
2 changes: 1 addition & 1 deletion lib/scripts/pm2-init-amazon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ start() {

stop() {
echo "Stopping $NAME"
super $PM2 dump
#super $PM2 dump
super $PM2 delete all
super $PM2 kill
rm -f $lockfile
Expand Down
2 changes: 1 addition & 1 deletion lib/scripts/pm2-init-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ start() {

stop() {
echo "Stopping $NAME"
super $PM2 dump
#super $PM2 dump
super $PM2 delete all
super $PM2 kill
rm -f $lockfile
Expand Down
2 changes: 1 addition & 1 deletion lib/scripts/pm2-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ start() {
}

stop() {
super $PM2 dump
#super $PM2 dump
super $PM2 delete all
super $PM2 kill
}
Expand Down

0 comments on commit f2714c7

Please sign in to comment.