H-Sphere Documentation Sysadmin Guide

 

Java Command Line Tools

 

This document lists java command line tools that come with the standard H-Sphere installation.

  1. DNSCreator
  2. IPMigratorFast
  3. PhysicalCreator
  4. PostApacheConfigs
  5. PostFTPConfigs
  6. ServerAliasesRenamer
  7. ChangeLServerId
  8. MIVAEmpresaFix
  9. KeyPairGenerator
  10. PGPEncrypter
  11. PGPMessageSigner
  12. PGPMessageVerify
  13. RepostResellerSSLConfigs
  14. ServiceZoneRenamer
  15. BillingEraser
  16. SetQuota
  17. UrchinReconfig
  18. OffLogs
  19. Reset Balance

IMPORTANT: before running a java tool, make sure to run
su -l cpanel

 

DNSCreator

NAME:
          java psoft.hsphere.tools.DNSCreator - H-Sphere DNS zones recreator.
USAGE:         
          Usage java psoft.hsphere.tools.DNSCreator -m creation_method [-dz] -z zonename
OPTIONS:          
          -m|  creation method. Possible values: db or rand
                db - pick NS servers as they are defined in the H-Sphere database
                rand - pick NS servers randomly
          -dz|--delete_zones - delete zones first.  Add this option only if such zones already exist.
                    With this option, DNS creation will take at least twice more time.
          -lids|--logical-servers - process zones which are on the logical servers with the specified IDs.
          -pip|--pServerIP - specifies a physical server by its primary IP. All necessary logical
                    server IDs are chosen automatically. Often -pip is used as an alternative to -lids.
          -z|--zone  - recreate only one specified zone.  Without this option, all zones will be recreated.
   Note: If both lids and -z parameters are specified, the -z parameter will be ignored.

DNS Creator is used in Single DNS Configuration, Changing IPs on Systems Using NAT, Moving DNS and in Moving Mail Accounts.

 

IPMigratorFast

NAME:
         psoft.hsphere.tools.IPMigratorFast - H-Sphere IP migration utility
SYNOPSIS:
         psoft.hsphere.tools.IPMigratorFast [options] ipmigration.
OPTIONS:
        --help  - shows this screen
        --ip-change     -  change IP
        --repost-configs        -  repost IP dependemd resources
        --recreate-zone         -  change and repost DNS records
        --service-zone  -  change service zone server IP
        --custom-rec    -  process service DNS records
        --lServerIds=,,...,      - to specify logical server ids
        --repost-cp-ssl         -  Repost SSL CP VHost configs
        --clear-old-ips         -  remove old ips from database and servers

 

PhysicalCreator

NAME:
     psoft.hsphere.tools.PhysicalCreator - Utility for physical recreation of H-Sphere resources
USAGE EXAMPLE:
     java -Xms64M -Xmx512M psoft.hsphere.tools.PhysicalCreator -rg mail -co -lid 22
SYNOPSIS:
     psoft.hsphere.tools.PhysicalCreator options
OPTIONS:
        -h|--help               - shows this screen
        -rg|--rgroup            - resource group to perform operations on
         The following resource groups are allowed:
                 unixweb:       Unix virtual hosting resources
                 winweb:        Windows virtual hosting resources
                 mysql:         MySQL resources
                 pgsql:         PGSQL resources
                 mail:          Mail resources
        -co|--create-only       - performs creation resources routines only
        -do|--delete-only       - performs delete resources routines only
        -rc|--recreate          - performs both delete and creation resources routines
        -lid|--lserverId        - process accounts on logical server with given number
        -accs|--accounts        - account IDs separated by comma
        -st|--start-from        - account ID. Process will start from this account ID
Make sure to specify Xms Xmx parameters to the java command when recreating a big number of accounts.
To learn more, type java -X

This tool is also used in Recovering H-Sphere Services.

For more info about this tool, read our document on Physical Creator.

 

PostApacheConfigs

Usage:
java psoft.hsphere.tools.PostApacheConfigs [-lid n ] [ -ic ]
        -lid|--lserverid n work only on accounts on logical server with passed number
        -ic|--initcontent initialise content
        -h|--help print this message

 

PostFTPConfigs

NAME:
        psoft.hsphere.tools.PostFTPConfigs - H-Sphere virtual FTP hosts gererator utility
SYNOPSIS:
        psoft.hsphere.tools.IPMigrator options
OPTIONS:
        -h|--help               - shows this screen
        -acc|--acountId number  - process only account with given number
        -lid|--lserverId        - process only accounts on logical server with given number
        -all|--all              - process all virtual FTPs

FTPConfig tool is used in ProFTPd 1.2.8p Update.

 

ServerAliasesRenamer

NAME:
     psoft.hsphere.tools.ServerAliasesRenamer - this H-Sphere tool recreates server aliases for resellers.
SYNOPSIS:
     java psoft.hsphere.tools.ServerAliasesRenamer [options]
Usage:
   java psoft.hsphere.tools.ServerAliasesRenamer
OPTIONS:   
         --help - shows this screen
         --xml  - run the tool for determined xml file
         --lserver ...  - run the tool for determined Logical Server IDs

 

ChangeLServerId

NAME:
         psoft.hsphere.tools.ChangeLServerId - changing logical server id in H-Sphere database
SYNOPSIS:
         psoft.hsphere.tools.ChangeLServerId [options]
OPTIONS:
        --help  - shows this screen
        -a|--account ACCOUNT_ID -f|--from LOGICAL_SERVER_ID_1 -t|--to 
LOGICAL_SERVER_ID_2
                where
                ACCOUNT_ID - id of the account you want to change;
                LOGICAL_SERVER_ID_1 - id of the logical server you want to change from;
                LOGICAL_SERVER_ID_2 - id of the logical server you want to change to;
SAMPLE:
        java psoft.hsphere.tools.ChangeLServerId -a 1000 -f 1 -t 2

This tool is also used in Moving Mail Accounts.

 

MIVAEmpresaFix

"MIVAEmpresaFix" utility.
    Adds MivaEmpresa resource to the plans;
    Adds this resource to users which already has MivaMerchant in use.
    Works for Unix and Windows plans
   Usage:
   java psoft.hsphere.tools.MIVAEmpresaFix

 

KeyPairGenerator

H-Sphere PGP key pair generator.
USAGE:
    java psoft.hsphere.tools.KeyPairGenerator
        -i|--identification <youridentification string>
        -s|--subkeyidentification <your session key identification>
        -e|--encryptphrase <phrase for encryption/decryption private key>
        -prf|--privatekeyfile <file where private key will be saved>
        -pcf|--publickeyfile <file where public key will be saved>

This tool is used in PGP Encryption in Trouble Tickets.

 

PGPEncrypter

java psoft.hsphere.tools.PGPEncrypter
   -m "This is a message to encrypt"
   -f "This is a file where encrypted phrase will be saved"
   -k "/path/to/PGP_Public_Key/file"

This tool is used for PGP Encryption in Trouble Tickets.

 

PGPMessageSigner

Misconfiguration H-Sphere PGP message signer.
Usage java psoft.hsphere.tools.PGPMessageSigner
   -m|--message <Message to sign>  or   -mf|--messagefile 
</path/to/file/with/message/to/sign>
   -f|--file </path/to/file/for/signed/message>
   -k|--key </path/to/private/key/file>
   -p|--codephrase <private code phrase>

 

PGPMessageVerify

Misconfiguration H-Sphere PGP message verify.
Usage java psoft.hsphere.tools.PGPMessageVerify
   -f|--messagefile </path/to/file/for/signed/message>
   -k|--key </path/to/public/key/file>

 

RepostResellerSSLConfigs

NAME:
    psoft.hsphere.tools.RepostResellerSSLConfigs - this H-Sphere tool recreates virtual host  config files for resellers.
SYNOPSIS:
    java psoft.hsphere.tools.RepostResellerSSLConfigs [options]
OPTIONS:
        --help - shows this screen
        --process - run the tool for all config files
        --reseller <res_name_1> <res_name_2>...<res_name_n> - run the tool for determined reseller user names.

 

ServiceZoneRenamer

Utility for changing service zone name. Changes zone name, LServers names, rebuilds DNS.
WARNING: USE ONLY ON EMPTY INSTALLATION OF H-SPHERE.
Usage java psoft.hsphere.tools.ServiceZoneRenamer -oz zone_name -nz
zone_name
    -oz|--old_zone Name of the currently present service zone
    -nz|--new_zone Name which should be set to service zone

 

BillingEraser

Permanently erases billing history of accounts.
Before running this utility, stop H-Sphere and back up H-Sphere system database.
SYNOPSIS:
    java psoft.hsphere.tools.BillingEraser --accounts list_of_account_ids --resellers list_of_reseller_ids
NOTE:
    Using --accounts and --resellers parameters simultaneously is disabled. Specified account and reseller ids are delimited with comma.

 

SetQuota

 NAME:
   java psoft.hsphere.tools.SetQuota - this H-Sphere tool resets quota on a web box according to the data
   found in H-Sphere DB for each account located on each logical server.

 

UrchinReconfig

NAME:
         psoft.hsphere.tools.UrchinReconfig
                - Regenerate Urchin config. Used, for example, after account migration to restore Urchin settings
                  for moved domains.
SYNOPSIS:
         psoft.hsphere.tools.UrchinReconfig [options]
OPTIONS:
        --help        - shows help
        -a|--accounts - list of account IDs delimited with ',', or 'all' for all accounts
        -s|--servers  - list of logical server IDs delimited with ',', or 'all' for all servers
SAMPLE:
        java psoft.hsphere.tools.UrchinReconfig -a '1002,8383,1237' -s '12,35,37'
        java psoft.hsphere.tools.UrchinReconfig -a all -s all

 

OffLogs

          -bash-2.05b$ java psoft.hsphere.tools.OffLogs --help
 NAME:
          psoft.hsphere.tools.OffLogs
                   - Regenerate users' logs and stats config
 SYNOPSIS:
          psoft.hsphere.tools.OffLogs [options]
 OPTIONS:
          --help - shows this screen
          -a|--accounts list of account IDs, or all for 'all' accounts, ',' - delimiter
          -s|--servers list of logical server IDs, or 'all' for all servers, ',' - delimiter
          -e|--errorlog re-generate errorlog only
          -ag|--agentlog re-generate agentlog only
          -r|--referrerlog re-generate referrerlog only
          -t|--transferlog re-generate transferlog only
          -w|--webalizer re-generate webalizer only
          -m|--modlogan re-generate modlogan only
          -aw|--awstats re-generate awstats only
 SAMPLE:
          java psoft.hsphere.tools.OffLogs -a '1002,8383,1237' -s '12,35,37'
          java psoft.hsphere.tools.OffLogs -a all -s all
          java psoft.hsphere.tools.OffLogs -s 24 -aw -w

 

Reset Balance

NAME: 
	 psoft.hsphere.tools.ResetBalance
		This H-Sphere tool resets billing balance using different criteria.
		By default, the tool runs only in information mode. To fix balances, run utility with --process option.
SYNOPSIS:
         psoft.hsphere.tools.ResetBalance options
OPTIONS:
	-h|--help - shows this screen
	-acc|--acountId number - process only accounts with given number
	-all|--all - process all accounts
	-b|--balance <ld balance> - process accounts with balance equal to <balance for process>
	-n|--newbalance <new balance> - set balance to <balance for process>
	-d|--description  - <credit description> - notes which will be added to credit operation
	--process - to force process, otherwise only affected accounts will show




User comments
No comments for this page.
Add comment


Home   Products   Services   Partners   Support   News   Contact   Forum
© 2020 psoft.net
All rights reserved.