cPGuard CLI Tool

From version 3.28, cPGuard is coming with a CLI utility using which you can manage most of the settings in cPGuard through commands. 

How to run CLI?

To manage the options using cPGuard CLI utility, use the following command from the command line.

/etc/cpguard/scripts/cpgbin

Example usage

The generic usage of the command is "/etc/cpguard/scripts/cpgbin <option> <arg1> <arg2>" ...an example is given below

/etc/cpguard/scripts/cpgbin rootkitscan enable

To display the help and usage details, run the command /etc/cpguard/scripts/cpgbin from command line.

Available Commands
 

scan <scan path> | ALL This option will scan the given path OR scan ALL websites
license status | add | renew This option will help to show license status and add or renew the license key
service stop | start | enable | disable This option will control automatic scanner daemon
waf enable | disable This option will help to quickly enable or disable WAF integration
binaryaction email | quarantine | disable This option will set the action to perform for binary files reported ( recommended is email )
suspaction email | quarantine | disable This option will set the action to perform for suspicious files reported ( recommended is email )
virusaction email | quarantine | disable This option will set the action to perform for virus files reported ( recommended is quarantine )
autoclean enable | disable This option will control automatic file cleanup feature
stopbruteforce enable | disable This option will control brute-force protection for your web apps
ipcheck enable | disable This option will control automatic IP reputation checks
srbl enable | disable This option will control SRBL integration with Exim
virus_autosuspend enable | disable  This option will control the account auto-suspend feature when virus files detect under an account 
domain_autosuspend enable | disable  This option will control the account auto-suspend feature when blacklisted domains detect under an account 
rootkitscan enable  | disable  This option will control the daily rootkit scanner scheduler
weeklyscan enable|disable This option will control the weekly server scan scheduler
wpcron enable | disable This option will control the wp-cron.php patch for all WordPress websites on a server 
primaryemail <email address> This option will set the primary contact email address
secondemail  <email address> This option will set the secondarycontact email address
update  This option will check for cPGuard version updates
version  This option will display the current cPGuard version

 

Please feel free to contact our support team if you need any additional details or wish to add anything else to the CLI tool.

Please rate this article to help us improve our Knowledge Base.

0 0