#!/bin/bash # ======== 下面是原来的下线逻辑 =========== if [ -f pid ]; then if kill `cat pid` ; then echo 'kill process succeed' else echo 'kill process fail' exit 1 fi else echo 'pid file not exists' exit 1 fi