To run the Gateway Command-line Utility, open a command shell and type: gwcmd <option>. This example uses the Windows platform:
From here, you can enter any of the command options listed in the table below. This example is of a Gateway backup using the following command: gwcmd -b "C:/Gateway Backups/Backup_190108.gwbk".
When using spaces in a file path name, use quotation marks around the full path name, as shown in the example above. Forward or backward slashes can be used to separate folders. The file path includes the disk name, folder path, and file name. |
The above command created a Gateway Backup on the C drive, in the Gateway Backups folder with a file name of Backup_190108.gwbk. The image below shows all the commands used in Steps 2 and 3.
One of the common uses for the Command-Line Utility is to start or stop the Gateway.
Ignition's installation directory contains start-ignition.bat
and stop-ignition.bat
, which can start or stop the service. Example:
C:\Program Files\Inductive Automation\Ignition> start-ignition.bat |
However, you can also use Windows native service commands to control the running state of the Gateway:
net start ignition |
net stop ignition |
You can control the service using the ignition.sh
script. It can be called with the start
and stop
parameters to perform the relevant operations.
For example:
/usr/local/bin/ignition/ignition.sh start |
Additionally, you can use native terminal commands to start or stop the service:
service ignition start |
service ignition stop |
You can access the service from the install directory using the "ignition.sh" script. On a typical Mac install using the dmg installer, the full command (without a custom location specified) is the following:
/usr/local/ignition/ignition.sh start |
The following table lists all available 'gwcmd' options.
Options | Description | |
---|---|---|
| Creates an activation_request.txt file that can be used to request a license.ipl file from the Inductive Automation website. You must specify the license key to use for activation. The activation_request.txt file is saved in the current directory. | |
-b,--backup <new filepath> | Downloads a Gateway backup You will be prompted whether it is OK to overwrite the file if another | |
-c,--clearks | Clears the gateway's SSL / TLS setup. The gateway's SSL / TLS connector will be immediately shut down. | |
-e, --exportks <new filepath> | Exports the gateway's SSL key store in PKCS12 format and saves to the specified path. | |
-f, --exportpk<new filepath> | Exports the private key from the gateway's SSL key store in PEM format and saves to the specified path. | |
| Reloads the Gateway's SSL keystore from disk. Any update to the keystore will be automatically applied to any new connections. | |
-h,--help | Shows the usage for this command. | |
-i,--info | Retrieves server status and port information from the Gateway if it is running. | |
-k,--port <new port> | Changes the Gateway http port. | |
-l,--sslport <new port> | Changes the Gateway https port. | |
-n, --nocrypt | Add to the export private key command to not encrypt the private key. | |
| Specifies a Gateway name while restoring a backup. Additionally, the | |
-p,--passwd | Enables a password change for the initial user. | |
-r,--restart | Restarts the Gateway. | |
-s,--restore | Restores a Gateway backup (.gwbk) file. | |
-t,--tdump | Performs a thread dump in the Gateway and prints the dump to the command-line. | |
-u,--unactivate Offline unactivation | Creates an unactivation_message.txt file that you can use to unactivate a license via the Inductive Automation website. The unactivation_message.txt file is saved in the current directory. | |
-w,--uselicense <license.ipl path> | Applies a license.ipl file that was downloaded from the Inductive Automation website. You must supply the location of the license.ipl file. If it is in the current directory, use license.ipl for the location. | |
-y,--promptyes | Automatically answers yes to any prompt that may appear in the above commands, such as permission to overwrite an existing file. |
If something happened and you can't get into the Gateway Webpage anymore, you may need to reset the master username/password. You can use this Gateway Command-line Utility to reset the main password for the user with full privileges. This 'gwcmd' utility triggers system commissioning, and prompts the user to enter a username and password for the main user (with full privileges) after the Gateway restarts.