#!/bin/bash PIDFILE=/tmp/doorlockd-pid if [ -f $PIDFILE ] then kill `cat $PIDFILE` rm $PIDFILE else echo "PID file not existent" fi