#!/bin/sh                                                                       
#
# Author: Peter Keel <killer@discordia.ch>
# Test for and make a pid-file in shell

PIDFILE="/var/run/$0.pid"
                                                                                
if [ -f $PIDFILE ]; then
    echo "Process already running. PID-file exists."
    exit
else
    echo $$ > $PIDFILE
fi

