You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.
The process_restart() function in /usr/local/lib/nsmnow/lib-nsm-common-utils
now looks like this:
process_restart()
{
# grab input variables with sane defaulting
APP=${1:-}
APP_OPTIONS=${2:-}
PID_FILE=${3:-}
LOG_FILE=${4:-}
APP_DESC=${5:-}
# Pull the PID out of the PID_FILE
# This must be done before process_stop since it deletes PID_FILE
PID=$(cat $PID_FILE)
# Ask the process to shut down
process_stop "$APP" "$PID_FILE" "$APP_DESC"
# Wait for the process to terminate gracefully
while [ `ps aux |grep $PID |grep -v grep |wc -l` -eq 1 ] ; do sleep 1; done
# Rotate the log file and keep a maximum of 10
mv "$LOG_FILE" "$LOG_FILE".`date +%Y%m%d%H%M%S`
[ `ls "$LOG_FILE".* |wc -l` -gt 10 ] && ls "$LOG_FILE".* |head -1 |xargs rm -f
# Start the process
process_start "$APP" "$APP_OPTIONS" "$PID_FILE" "$LOG_FILE" "$APP_DESC"
}
Original comment by doug.bu...@gmail.com on 2 Feb 2012 at 1:22
Original issue reported on code.google.com by
doug.bu...@gmail.com
on 2 Feb 2012 at 1:14The text was updated successfully, but these errors were encountered: