Kennisbank
WHM Scripts Print dit artikel
Overview:
The cPanel & WHM installation process adds important scripts to your server’s /usr/local/cpanel/scripts
directory. To run a script, enter its location on the command line. For example, to run the update script, run the following command:
/usr/local/cpanel/scripts/upcp
To display help for a script, add the --help
argument. For example, to display help for the update script, run the following command:
/usr/local/cpanel/scripts/upcp --help
-
When you run a script, you must use the script’s full file path, even if you run the script in the
/usr/local/cpanel/scripts
directory. -
Do not use scripts in the
/usr/local/cpanel/scripts
directory that we do not list in this document. You may damage your server if you run those unlisted scripts.
Scripts
addpop
This script adds an email.
auto-adjust-mysql-limits
This script updates the following MySQL® settings in the SQL section of WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings):
- Allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration?
- Allow cPanel & WHM to determine the best value for your MySQL max_allowed_packet configuration?
- Allow cPanel & WHM to determine the best value for your MySQL innodb_buffer_pool_size configuration?
For more information, read our The auto-adjust-mysql-limits
Script documentation.
backup
This script runs a manual backup in WHM via the command line. For more information, read our backup script documentation.
backups_clean_metadata_for_missing_backups
This script removes the metadata for backup files that a user has manually removed from the system. For more information, read our The backups_clean_metadata_for_missing_backups
Script documentation.
backups_create_metadata
This script creates metadata files for all backup types. For more information, read our The backups_create_metadata
Script documentation.
backups_list_user_files
This script locates a user’s files in compressed, uncompressed, or incremental backups. It returns all files in the backups in Comma Separated Value (CSV) format. For more information, read our The backups_list_user_files Script documentation.
backup_restore_manager
This script manages the backup restoration queue. For more information, read our The backup_restore_manager
Script documentation.
This script exists in the /usr/local/cpanel/bin
directory.
balance_linked_node_quotas
This script lets you enforce disk use quotas for distributed cPanel accounts. For more information, read our balance_linked_node_quotas
script documentation.
build_maxemails_config
This script sets limits on the amount of email that users can send from domains on your server. For more information, read our How to Prevent Spam with Mail Limiting Features documentation.
ccs-check
This script manages maintenance for the Calendar and Contacts Server (CSS) Plugin. It allows CCS to run with your server’s SSL certificate. You can run this script after you install the CCS plugin on your server. For more information, read our The ccs-check
Script documentation.
check_cpanel_rpms`
This script scans every installed RedHat® Package Manager (RPM) file on your server for problems. For more information, read our The check_cpanel_rpms
Script documentation.
check_security_advice_changes
This script returns the system’s current security state. It will also provide information about how to resolve any security issues that it finds. You can configure this script to notify you when there is a change in the Security Advisor’s state. For more information, read WHM’s Security Advisor interface (WHM >> Home >> Security Center >> Security Advisor) documentation.
check_users_my_cnf
This script checks cPanel accounts for malfunctioning ~/.my.cnf
files and it disables them. This script only returns output when it detects a bad .my.cnf
file.
/usr/local/cpanel/scripts/check_users_my_cnf --help
checkallsslcerts
This script installs or updates a cPanel-signed hostname certificate.
For more information, read our The checkallsslcerts
Script documentation.
This script exists in the /usr/local/cpanel/bin
directory.
chkmydns
This script performs a simple configuration check of MyDNS.
cleansessions
This script removes various session files for the following applications:
-
phpMyAdmin
-
phpPgAdmin
-
Webmail applications
It also removes the following expired files:
-
cPanel Password Reset session flood protect files.
-
cPanel Subaccount Invitation session and flood protect files.
clean_up_temp_wheel_users
This script removes temporary wheel group users that cPanel Support no longer requires.
When you use WHM’s Grant cPanel Support Access interface (WHM >> Home >> Support >> Grant cPanel Support Access) and Create Support Ticket interface (WHM >> Home >> Support >> Create Support Ticket), the system will create temporary wheel users for cPanel Support.
clean_user_php_sessions
This script purges expired PHP session files from a secure temporary directory. For more information, read our The clean_user_php_sessions
Script documentation.
comparecdb
This script compares the contents of two CDB (Card DataBase format) files. Specify the two CDB files that you wish to compare. For example, run the following command, where file1
and file2
represent the two files that you wish to compare:
/usr/local/cpanel/scripts/comparecdb file1 file2
configure_rh_ipv6_firewall_for_cpanel
This script sets up your IPv6 firewall. Run this script if either of the following statements are true:
-
You do not manage your IPv6 firewall rules with any other tools or utilities.
-
You cannot connect to your IPv6 addresses or IPv6-enabled websites on port
80
.
-
Only users with
root
privileges can run this script. -
The rules that this script creates remain active even if you reboot the server.
-
Due to the way in which CentOS7, CloudLinux™ 7, and Red Hat® Enterprise Linux (RHEL) 7 manage firewalls, we do not recommend that you use this script if your server uses one of those operating systems.
This script performs the following actions:
-
Opens port
22
for SSH. -
Opens port
53
for DNS. -
Opens port
80
for HTTP.
convert_accesshash_to_token
This script converts a WHOM user’s access hash to an API token. For more information, read our The convert_accesshash_to_token
Script documentation.
convert_mdbox_to_maildir
This script converts mailboxes from mdbox
format to maildir
format. For more information, read our The Mailbox Format Conversion Scripts documentation.
convert_roundcube_mysql2sqlite
This script converts the Roundcube database from MySQL® to SQLite.
You may need to convert individual accounts, even after the database conversion. To convert individual cPanel accounts that use Roundcube to SQLite, add the username as the parameter:
/usr/local/cpanel/scripts/convert_roundcube_mysql2sqlite user
copy-etc-files
This script creates customized copies of your /etc/bashrc
, /etc/issue
, and /etc/issue.net
files in the /etc
directory.
cpanel_dovecot_solr_rebuild_index
This script rebuilds your Apache Solr™ index files if they become corrupt. For more information, read our The cpanel_dovecot_solr_rebuild_index
Script documentation.
This script exists in the /usr/local/cpanel/3rdparty/scripts
directory.
cpbackup
This script backs up all cPanel accounts.
cpdig
This script performs a DNS query with cPanel & WHM’s DNS resolver. This script’s result should equal the dig +trace
command’s end result. For example, run the following command:
cpdig www.example.com AAAA
In this example, www.example.com
is a domain and AAAA
is a type of domain record.
cpuser_port_authority
This script assigns one or more five-digit port numbers for a user’s exclusive use. For more information, read our The cpuser_port_authority
Script documentation.
dbmaptool
This script grants ownership of databases and database users to a cPanel user via the command line. For more information, read our The dbmaptool
Script documentation.
This script exists in the /usr/local/cpanel/bin
directory.
dbstoregrants
This script synchronizes MySQL® user’s grants for the YAML and JSON files in the /var/cpanel/databases/
directory through the command line. For more information, read our The dbstoregrants
Script documentation.
This script exists in the /usr/local/cpanel/bin
directory.
delpop
This script removes a POP account.
dnssec-cluster-keys
This script syncs and revokes currently active DNSSEC keys in a DNS cluster. For more information, read our The dnssec-cluster-keys
Script documentation.
dovecot_maintenance
This script deletes expired messages from trash folders. It also cleans out invalid usernames from the database tables. Use the Trash Expire Time setting in WHM’s Mailserver Configuration interface (WHM >> Home >> Service Configuration >> Mailserver Configuration) to set the expiration time. To activate this script, select the Auto Expunge Trash checkbox.
This script runs while the nightly maintenance script runs.
dumpcdb
This script displays the contents of a CDB file. Specify the CDB file that you wish to view. For example, run the following command, where file represents the file
that you wish to view:
/usr/local/cpanel/scripts/dumpcdb file
ea4_fresh_install
This script installs EasyApache 4.
email_hold_maintenance
This script removes the tracking file for email hold on mail to release or delete from the mail queue.
empty_user_trash
This script purges expired files from .trash
folders in user home directories. Use the Age of content to purge from users’ File Manager Trash setting in the System section of the WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings) to set the expiration time.
-
This script runs while the nightly maintenance script runs.
-
This script exists in the
/urs/local/cpanel/bin
directory.
enable_spf_dkim_globally
This script enables SPF and DKIM for every cPanel user on the server. Then it creates SPF and DKIM records for all of these users’ domains. For more information, read our The enable_spf_dkim_globally
Script documentation.
eximstats_spam_check
This script scans the eximstats
database and counts the number of emails that every domain on the server has sent in the previous hour. If a domain exceeds the preconfigured threshold of unique outbound messages (excluding mailing lists), the system will log an alert. Use the following settings in the Mail section of WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings) to configure this script:
-
Number of unique recipients per hour to trigger potential spammer notification — Configure the threshold value of unique outbound messages.
-
Select the action for the system to take on an email account when it detects a potential spammer — Configure the script to take no action, hold, or reject additional outbound messages if the domain exceeds the threshold value.
exportmydnsdb
This script exports zones from MyDNS for BIND and NSD to use.
find_and_fix_rpm_issues
This script detects issues with your server’s RPM database and, if problems exist, rebuilds the database. For more information, read our The find_and_fix_rpm_issues
Script documentation.
find_outdated_services
This script checks all services to determine whether they require a restart. An outdated service is any service that depends on a library that is no longer present on the system.
For more information, read our The find_outdated_services
Script documentation.
fix_addon_permissions
This script adjusts the permissions on cPAddon-specific files that contain sensitive information. This script only adjusts cPAddons that follow the tighter security model in cPanel & WHM version 64 and later.
Some cPAddons possess security-sensitive files, such as files that contain passwords in clear text. cPAddons that exist on servers that do not use the mpm-itk
, mod_ruid2
, or mod_suphp
modules require additional file permission adjustments to prevent security issues between users. For security reasons, we do not recommend that you install any cPAddons on shared hosting servers without one of these modules.
fixmailinglistperms
This script repairs permissions for all mailing list files and directories.
fixndc
This script resolves ndc connection refused
errors.
To correctly use this script, run the following commands:
|
|
You must run the /scripts/fixndc
script twice.
fix-web-vhost-configuration
This script scans each user’s web virtual host configuration files and removes excess alias names from the serveralias
parameter.
For more information, read our The fix-web-vhost-configuration
Script documentation.
gather-update-logs
This script sends update logs to cPanel, L.L.C. for analysis. For more information, read our The gather-update-logs
Script documentation.
Was dit antwoord nuttig?
Was dit antwoord nuttig?
Gerelateerde artikelen
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
Overview: This script allows you to manage the task queue system. The task queue system allows...
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...
Overview: Use the /usr/local/cpanel/bin/backup script to run a manual backup in WHM via the...