#!/bin/sh
case $1 in
  start)
    [ -f @PREFIX@/etc/perforce ] && . @PREFIX@/etc/perforce
    if [ x$PERFORCE_START = xyes ]; then
      echo -n ' perforce'
      p4d -r $PERFORCE_ROOT $PERFORCE_OPTIONS
    fi
    ;;
  stop)
    killall p4d && echo -n ' perforce'
    ;;
  *) ;;
esac
