README #2

  • //
  • guest/
  • tony_smith/
  • perforce/
  • p4dctl/
  • src/
  • README
  • View
  • Commits
  • Open Download .zip Download (2 KB)
			P4DCTL README
			-------------

P4DCTL is a program for starting and stopping Perforce services on Unix 
platforms. It's designed to be used both by root and non-root users and
to integrate well with init.d or rc scripts for boot/shutdown. It allows
the system administrator to specify the Perforce services they wish to
start on the box in a single configuration file (/etc/p4d.conf), or in
a set of configuration files under /etc/p4d.d

BUILDING FROM SOURCE
--------------------

If you're building inside Perforce, you can just sync the P4 tree as
well as p4dctl and use jam.

If you're building from the Public Depot sources, you'll need Perforce Jam, the 
Perforce API, and optionally the openssl library (on Ubuntu, you need the 
libssl-dev package). Once you've installed those, simply use:

	jam -sP4=<path to Perforce API>

You will also need to specify your operating system version for Linux builds. For example, for a Linux 2.6 build, I use:

	jam -sP4=<path to Perforce API> -sOSVER=26 -sSSL=yes

Then to install the binary, run the command below as root:

	jam -sP4=<path to Perforce API> -sOSVER=<version> install

This will install the binary in /usr/local/bin and make it a setuid root
executable. I believe the program to be secure, though obviously I can't
guarantee that.

INSTALLING A PRE-BUILT BINARY
-----------------------------

If you're using a pre-built binary, just copy it into /usr/local/bin, and run
the following commands:

	chown root:0 /usr/local/bin/p4dctl
	chmod 4711 /usr/local/bin/p4dctl

CONFIGURATION
-------------

The simplest way to get started is to copy the p4d.conf.sample from the 
distribution into /etc/p4d.conf and edit it to reflect your needs.

USAGE
-----

See 'p4dctl -h' for command-line syntax
# Change User Description Committed
#2 8326 Tony Smith Some significant updates to p4dctl.

1. Support for interacting with SSL enabled servers
2. New command 'list' to list configured servers

      p4dctl [ options ] list [ -t type ] -a
             p4dctl [ options ] list [ -t type ] servername

3. New command 'env' to allow you to fetch arbitrary
   settings from a configured server in a form suitable for use
   with 'eval'.

    p4dctl [ options ] env [ -t type ] -a var [ var...  ]
    p4dctl [ options ] env [ -t type ] servername var [ var...  ]

4. Supply a new manpage for p4dctl
#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.