Command Line Options

Top  Previous  Next

In addition to the standard start, stop, and restart options, the cp20s program supports some other control features to help bootstrap or manage an installation.  Most of these options require that you be logged in as "root" on Linux or "Administrator" on Windows.

 

Results are printed to the screen, unless you include -o "filename", in which case the result is written to the specified file.

 

All errors are reported in the syntax "Error: message", providing a pattern to watch for.

 

These options do not require a root or Administrator login:

 

cp20s -v        Displays a version message

cp20s -help        Displays a help file

 

These options are only supported when logged in as root (Linux) or an administrator (Windows):

 

cp20s -status [connections|procs|devs]

Displays status information.  By default, license information is displayed.  Specify alternate options with one of the additional options, connections, procs, or devs to display a pipe-delimited list of active connections, running processes related to the CirrusPrint server, or active device records.

 

cp20s -getpass userid  [ -q ]

Gets the password for the user specified.  The -q option prints only the password, rather than a message.

 

cp20s -resetpass userid [ -password "value" ] [ -o filename ] [ -q ]

Resets the user password to the supplied value, or a random one, and displays it. The -q option prints only the password, rather than a message.

 

cp20s -update companies -companyid "value" options

Updates or creates a company record with the given company ID.  Any number of additional options may be supplied to update specific fields of the company record.  Options include:

 

-companyname "value"

-address1 "value"

-address2 "value"

-address3 "value"

-address4 "value"

-contact "value"

-phone1 "value"

-phone2 "value"

-email1 "value"

-email2 "value"

-inactive 0|1

-notes "value"  (use \n for newlines, \t for tabs, \\ for \)

-vhostname "value"  (use \n to separate hostname values)

-printports "start-end" (range of port numbers, such as 10200-10299)

-maxinputs number (maximum number of ports or paths a process can monitor - default is 10)

-expires "m/d/y h:m[pm]"  (sets an expiration date/time for this company)

 

cp20s -delete companies -companyid "value"

Deletes the specified company ID.  Returns OK or an error message.

 

cp20s -list companies options

Lists companies based on the following options:

 

-first number (the first company sequence, defaults to 1)

-count number (the last company sequence, defaults to the number of records on file)

-flds "field1,field2,..." (list of fields to return, defaults to all)

-xml (xml output format - default is tab-separated-values)

 

 

cp20s -update users -userid "value" options

Updates or creates a site user record with the given user ID.  Any number of additional options may be supplied to update specific fields of the user record.  Options include:

 

-username "value"

-password "value"

-email "value"

-allowfrom "value" (IP values, wildcards, ranges, separated by semicolons)

-admin 0|1

-enableapi 0|1

-inactive 0|1

-companies "value" (valid company ID's separated by semicolons)

 

 

cp20s -delete users -userid "value"

Deletes the specified user ID.  Returns OK or an error message.

 

cp20s -list users options

Lists companies based on the following options:

 

-first number (the first user sequence, defaults to 1)

-count number (the last user sequence, defaults to the number of records on file)

-flds "field1,field2,..." (list of fields to return, defaults to all)

-xml (xml output format - default is tab-separated-values)

 

cp20s -repair

Runs a repair operation on all configuration data files for all companies.  This can be used if you suspect corruption in a data file.  This can be run while the server is running, as it does not lock any data files.

 

cp20s -usage options

Reports current usage of different objects and subtypes by company, including locations, devices, jobs, and disk usage.  Jobs include counts for today, yesterday, and month-to-date.  Disk is reported in bytes and is a based on usage at the time the command is run.

 

-xml (xml output format - default is tab-separated-values)