-------------
#!/bin/sh -e
export P4JOURNAL=/var/log/perforce/journal
export P4LOG=/var/log/perforce/p4err
export P4ROOT=/var/perforce_depot
export P4PORT=1666
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
. /lib/lsb/init-functions
p4start="p4d -d"
p4stop="p4 admin stop"
p4user=perforce
case "$1" in
start)
log_action_begin_msg "Starting Perforce Server"
daemon -u $p4user $p4start;
;;
stop)
log_action_begin_msg "Stopping Perforce Server"
p4Pid=$(pidof /usr/local/bin/p4d);
kill -9 $p4Pid;
;;
restart)
stop
start
;;
*)
echo "Usage: /etc/init.d/perforce (start|stop|restart)"
exit 1
;;
esac
exit 0
--------------
Friday, 13 January 2012
My Perforce init.d script
Posted by
nerdtron_dev
at
18:50
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment