Difference between revisions of "Command Line"

From PC2wiki
Jump to: navigation, search
m (fixed link typo)
(add usage and -F sections)
Line 1: Line 1:
 
The command line options for [[PC²]] for [[Version 9]]
 
The command line options for [[PC²]] for [[Version 9]]
  
These are options that can be used with the [[PC² scripts]].
+
These are options that can be used with the [[PC² scripts]]
 +
 
 +
==Usage==
 +
 
 +
All [[PC&sup2; scripts]] print usage using the <tt>--help</tt>
 +
command line option, for example:
 +
 
 +
pc2server --help
  
All these command line options are optional, if not specified the user will
 
be prompted via GUI to enter the information.
 
  
 
==Login/Password options==
 
==Login/Password options==
Line 47: Line 52:
  
 
  pc2server --login site2 --password sitepass2
 
  pc2server --login site2 --password sitepass2
 +
 +
==-F option==
 +
 +
The –F command line option will load command line options from an input text file. This option is a security feature. Under most Unix systems the complete command line is listed when using a <tt>ps </tt>or similar command revealing login ids and passwords. Using the -F option, login ids and passwords can be stored in a text file. Note that the command line options are not limited to login and password options; any command line option can be stored in the specified text file.
 +
 +
If this command line was used:
 +
pc2server --nogui --contestpassword cpass --login site1 --password site1pass
 +
One could alternatively use the -F option:
 +
pc2server -F secure.txt
 +
 +
where secure.txt contains
 +
 +
#
 +
# Command line for non GUI server
 +
#
 +
--nogui
 +
--contestpassword cpass
 +
--login site1
 +
--password site1pass
 +
 +
In the file blank lines and lines starting with a # are ignored.
 +
Each command line option must be on a different line.
  
 
==See Also==
 
==See Also==
 
* [[Primary server]]
 
* [[Primary server]]
 
* [[Secondary server]]
 
* [[Secondary server]]
 +
* [[PC&sup2; scripts]]

Revision as of 13:40, 7 January 2012

The command line options for PC² for Version 9

These are options that can be used with the PC² scripts

Usage

All PC² scripts print usage using the --help command line option, for example:

pc2server --help


Login/Password options

Option Description Example
--login Login Login name --login server1
--login team2
--password Password Password --password Password

Examples

This will attempt to login account team3 with the password passone.

pc2team --login team3 --password passone

This will attempt to login account team3 with the password team3 (A joe account)

pc2team --login team3

Primary server Options

Primary server only
Option Description Example
--contestpassword Contest password --contestpassword pass

Examples

This will attempt to start a Primary server with contest password contest33 login account site1 with the password site1.

pc2server --login site1 --contestpassword contest33

This will attempt to login account site2 with the password sitepass2.

pc2server --login site2 --password sitepass2

-F option

The –F command line option will load command line options from an input text file. This option is a security feature. Under most Unix systems the complete command line is listed when using a ps or similar command revealing login ids and passwords. Using the -F option, login ids and passwords can be stored in a text file. Note that the command line options are not limited to login and password options; any command line option can be stored in the specified text file.

If this command line was used:

pc2server --nogui --contestpassword cpass --login site1 --password site1pass

One could alternatively use the -F option:

pc2server -F secure.txt

where secure.txt contains

#
# Command line for non GUI server
#
--nogui
--contestpassword cpass
--login site1
--password site1pass

In the file blank lines and lines starting with a # are ignored. Each command line option must be on a different line.

See Also