Welcome, Guest
Username Password: Remember me

Run perforce Server as a Service
(1 viewing) (1) Guest
Perforce
  • Page:
  • 1

TOPIC: Run perforce Server as a Service

Run perforce Server as a Service 1 year, 3 months ago #571

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44559
  • Karma: 4
  • Honor Medal 2009
Run perforce Server as a Service OR boot automatically when system restart


Template of p4d file under /etc/init.d
========================================

 
 
#! /bin/sh
#
# chkconfig: 35 95 05
# description: Perforce revision control system server.
#

umask 022
 
# Source function library.
. /etc/rc.d/init.d/functions
 
. /etc/p4d.conf
 
START_CMD="${P4D_DAEMON} -d -L $P4D_LOG -J $P4D_JOURNALS -r $P4D_ROOT -p $P4D_PO RT"
 
# See how we were called.
case "$1" in
start)
echo -n "Starting p4d "
if [ ! -z "$P4D_USER" ]; then
su - $P4D_USER -c "$START_CMD"
else
$START_CMD
fi
touch /var/lock/subsys/p4d
;;
stop)
echo -n "Stopping p4d: "
killproc p4d
 
echo
rm -f /var/lock/subsys/p4d
;;
status)
status p4d
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: p4d {start|stop|status|restart}"
exit 1
esac
 
exit 0
 
 




Template of p4d.conf
=====================================

P4D_ROOT=/local/home/perforce/p4root
P4D_DAEMON=${P4D_ROOT}/p4d
P4D_LOG=${P4D_ROOT}/logs/p4d.log
P4D_JOURNALS=/backups/perforce_journal/journal
P4D_USER=perforce
P4D_PORT=1666


Add /etc/init.d/p4d into chkconfig using following command...

chkconfig --add /etc/init.d/p4d
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar

Re: Run perforce Server as a Service 1 year, 2 months ago #574

  • chander
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Points: 28
  • Karma: 0
I think Services is a windows concept and method.

To run perforce as a service the Perforce Server should be installed as a Windows service. Then an Administrator privileges can start and stop it using the Services dialog in the Control Panel.

To start the Perforce service:
Context-click on "My Computer", and select "Manage". The "Computer Management" window is displayed.
In the right hand pane, double click on "Services and Applications".
Double click on "Services". You now have a list of available Windows services.
Scroll down until you see the "Perforce" service. Right click on this item and select "Start".

In Unix it is running as a Daemon

Re: Run perforce Server as a Service 1 year, 2 months ago #575

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44559
  • Karma: 4
  • Honor Medal 2009
Hi chander,

Thanks for correcting terminology and your inputs for windows...
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar
  • Page:
  • 1
Time to create page: 1.29 seconds

     
    
Home Forum