p4d.conf.sample #1

  • //
  • guest/
  • brett/
  • p4dctl/
  • src/
  • p4d.conf.sample
  • View
  • Commits
  • Open Download .zip Download (2 KB)
#-------------------------------------------------------------------------------
# Sample /etc/p4d.conf file for p4dctl
#
# Specify the servers that run on your box ensuring that you specify at least
# the following variables for each server:
#
# Owner		- the username to start the server under
# Execute	- the binary to run
# PATH		- the Unix path.
#
# Optionally, you may also specify:
#
# Args		- a string containing any command line arguments to pass. Note
#		  that since arguments are separated by spaces, you should
#		  enclose the string in double quotes ("")
#
# Specific server types will also have required variables, for example the 
# 'p4d' type requires the presence of P4ROOT and P4PORT.
#
# Any other variables you set in either the global section, or in a 
# server-specific section will be set in the environment of the server
# process.
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Global environment variables
#-------------------------------------------------------------------------------
P4DEBUG	=	server=3
P4LOG	=	log
P4CONFIG =	.p4config

#-------------------------------------------------------------------------------
# Server specifications
#-------------------------------------------------------------------------------
p4d main
{
    Owner	= 	perforce
    Execute	=	/usr/local/bin/p4d
    P4ROOT	=	/home/perforce/p4-main
    P4JOURNAL	=	journal
    P4PORT	=	1666
    PATH	=	/bin:/usr/bin:/usr/local/bin
}

p4d test
{
    Owner	= 	tony
    Execute	=	/usr/local/bin/p4d
    P4ROOT	=	/home/tony/p4tmp
    P4JOURNAL	=	journal
    P4PORT	=	1667
    PATH	=	/bin:/usr/bin:/usr/local/bin
}

p4p india
{
    Owner	=	perforce
    Execute	=	/usr/local/bin/p4p
    P4PCACHE	=	/home/perforce/p4p-india
    P4TARGET	=	india.mycorp.com
    P4PORT	=	1777
    PATH	=	/bin:/usr/bin:/usr/local/bin
}

p4web main
{
    Owner	=	tony
    Execute	=	/usr/local/bin/p4web
    Args	=	"-b"
    P4WEBPORT	=	8080
    P4PORT	=	1666
    P4CLIENT	=	p4webclient
    PATH	=	/bin:/usr/bin:/usr/local/bin
}
# Change User Description Committed
#1 7841 brett Initial branch of the Unix Perforce Server Control tool.
See if this can be made to operate under Windows.
//guest/tony_smith/perforce/p4dctl/src/p4d.conf.sample
#1 5945 Tony Smith Release p4dctl, a program for starting/stopping Perforce services
on Unix operating systems. Similar to, and developed in concert
with, Sven Erik Knop's p4dcfg.

For example:

    p4dctl start -a

Can start multiple P4D, P4P, P4Web, or P4FTP servers in one easy
command line. It can be executed by root, or by the 'owners' of
the configured services and it maintains pidfiles no matter who
uses it (so they remain accurate).

An init script using p4dctl will typically just use:

    p4dctl start -a
    p4dctl stop -a
    p4dctl restart -a

And check the exit status.