This document lists java command line tools that come with the standard H-Sphere installation. - DNSCreator
- IPMigratorFast
- PhysicalCreator
- PostApacheConfigs
- PostFTPConfigs
- ServerAliasesRenamer
- ChangeLServerId
- MIVAEmpresaFix
- KeyPairGenerator
- PGPEncrypter
- PGPMessageSigner
- PGPMessageVerify
- RepostResellerSSLConfigs
- ServiceZoneRenamer
- BillingEraser
- SetQuota
- UrchinReconfig
- OffLogs
- Reset Balance
IMPORTANT: before running a java tool, make sure to run su -l cpanel DNSCreatorNAME:
java psoft.hsphere.tools.DNSCreator - H-Sphere DNS zones recreator.
USAGE:
Usage java psoft.hsphere.tools.DNSCreator -m creation_method [-dz] -z zonename
OPTIONS:
<i>-m|</i> creation method. Possible values: <i>db</i> or <i>rand</i>
<i>db</i> - pick NS servers as they are defined in the H-Sphere database
<i>rand</i> - pick NS servers randomly
<i>-dz|--delete_zones</i> - delete zones first. Add this option only if such zones already exist.
With this option, DNS creation will take at least twice more time.
<i>-lids|--logical-servers</i> - process zones which are on the logical servers with the specified IDs.
<i>-pip|--pServerIP</i> - specifies a physical server by its primary IP. All necessary logical
server IDs are chosen automatically. Often <i>-pip</i> is used as an alternative to <i>-lids</i>.
<i>-z|--zone</i> - recreate only one specified zone. Without this option, all zones will be recreated.
<i>Note:</i> If both <i>lids</i> and <i>-z</i> parameters are specified, the <i>-z</i> 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. IPMigratorFastNAME:
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=<id1 />,<id2 />,...,<idn /> - to specify logical server ids
--repost-cp-ssl - Repost SSL CP VHost configs
--clear-old-ips - remove old ips from database and servers PhysicalCreatorNAME:
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 -XThis tool is also used in Recovering H-Sphere Services. For more info about this tool, read our document on Physical Creator. PostApacheConfigsUsage:
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 PostFTPConfigsNAME:
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 FTPsFTPConfig tool is used in ProFTPd 1.2.8p Update. ServerAliasesRenamerNAME:
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 <file.xml /> - run the tool for determined xml file
--lserver <l_server_id_1 />... <l_server_id_n /> - run the tool for determined Logical Server IDs ChangeLServerIdNAME:
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 2This 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 KeyPairGeneratorH-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. PGPEncrypterjava 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. PGPMessageSignerMisconfiguration 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> PGPMessageVerifyMisconfiguration 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> RepostResellerSSLConfigsNAME:
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. ServiceZoneRenamerUtility 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 BillingEraserPermanently 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. UrchinReconfigNAME:
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 BalanceNAME:
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 <description /> - <credit description> - notes which will be added to credit operation
--process - to force process, otherwise only affected accounts will show |