#!/bin/sh # v0.0.1 pid_list=$(ps aux | grep ipfcst-spare2 | grep -v grep | awk '{print $2}' | tr -d '\n') if [[ -z "${pid_list}" ]]; then export basedir=/home/syjy/ipfcstV3 export bindir=$basedir/bin sh $bindir/restart-spare2.sh fi exit 0