#!/bin/bash #============================================================================== # Copyright and license info is available in the LICENSE file included with # the Server Deployment Package (SDP), and also available online: # https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/LICENSE #------------------------------------------------------------------------------ # # Perforce server base init script # p4dtg Init Script. # chkconfig: - 90 30 # description: Perforce Server Start Up Script export TMP=$P4TMP if [ `$ID -u` = 0 ]; then exec su - $OSUSER -c "$0 $1" elif [ "`$ID -u -n`" != $OSUSER ]; then echo "$0 can only be run by root or $OSUSER" exit 1 fi # You need to update the name of the p4dtg configuration below # Replace p4bz with your p4dtg configuration name # See how we were called. case "$1" in start) /p4/p4dtg-2010.2.452775/p4dtg-repl p4bz /p4/p4dtg-2010.2.452775/ & ;; stop) cd /p4/p4dtg-2010.2.452775/repl touch stop-p4bz echo ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0