#!/bin/sh cmd="znc" pidfile="${HOME}/.znc/znc.pid" if test -s $pidfile; then pid=`cat $pidfile` if `kill -0 $pid >/dev/null 2>&1`; then exit 0 fi rm -f $pidfile fi echo "" echo "Reloading..." echo "" $cmd exit 0