How to: Create One-Line Commands Using the InterWorx CLI Utility

Using the InterWorx CLU Utility with the -v or --verbose flags will provide a one-line command to perform a desired task. Server Administrators can use this output to create custom scripts for regular tasks.

To Create a One-Line Command

Note

While the following uses the nodeworx user as an example, the same steps can be completed with the siteworx user, as well.

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Access to the NodeWorx CLI Utility as the master NodeWorx user, using the nodeworx command with the -u (or --user) and -v (or --verbose) flags

    nodeworx -u -v
    
  3. Follow the prompts for the desired task. This completes the task, and, because of the -v or --verbose flags, it also provides output of the command that ran to perform that task. The following example is to suspend a SiteWorx account called mywebsite.com for non-payment:

    {Controllers and Actions Removed}
    
    Domain [none] : 2
    +--------------------------------------------------------------------+
    |                              Suspend                               |
    +--------------------------------------------------------------------+
    
    Confirm suspending of the following
    
    Domain : mywebsite.com
    Message : Press [Enter] to launch editor
    "/tmp/iw_cli_input_CTxmUD/message" 1L, 33C written
    Account suspended for nonpayment
    Suspend? [] : yes
    
    Success
    Command executed: nodeworx -u -n -c Siteworx -a suspend --message Account suspended for nonpayment --domain mywebsite.com