path: vip-manager_1.0.2-10/package/scripts/vip-manager fi function pidofproc { if [ $# -ne 3 ]; then echo "Expected three arguments, e.g. $0 -p pidfile daemon-name" path: vip-manager_1.0.2-10/package/scripts/vip-manager # Check the status of the process. if [ -e $pidfile ]; then if pidofproc -p $pidfile $daemon > /dev/null; then log_success_msg "$name Process is running" exit 0 path: vip-manager_1.0.2-10/package/scripts/vip-manager # Checked the PID file exists and check the actual status of process if [ -e $pidfile ]; then pidofproc -p $pidfile $daemon > /dev/null 2>&1 && status="0" || status="$?" # If the status is SUCCESS then don't need to start again. if [ "x$status" = "x0" ]; then path: vip-manager_1.0.2-10/package/scripts/vip-manager # Stop the daemon. if [ -e $pidfile ]; then pidofproc -p $pidfile $daemon > /dev/null 2>&1 && status="0" || status="$?" if [ "$status" = 0 ]; then if killproc -p $pidfile SIGTERM && /bin/rm -rf $pidfile; then