CPanel Scripts: Difference between revisions

From Psygen Wiki
Jump to navigation Jump to search
Line 5: Line 5:
== Scripts ==
== Scripts ==


<code>/scripts/whowns <i>domain.com</i></code> - Tells you which cPanel account owns the specified domain.<br />
<code>/scripts/whowns <i>domain.com</i></code> - Tells you which cPanel account owns the specified domain.
<br />
 
<code>/scripts/upcp --force</code> - Updates cPanel (use with caution)
<code>/scripts/upcp --force</code> - Updates cPanel (use with caution)
<code>/scripts/pkgacct <i>user</i></code> - backs up the entire specified cPanel account, including databases, e-mail, settings, etc. Replace "user" with the cPanel username to backup.


<code>/usr/local/cpanel/bin/checkallsslcerts</code> - Checks All SSL certificates.
<code>/usr/local/cpanel/bin/checkallsslcerts</code> - Checks All SSL certificates.
Line 22: Line 20:


<code>/usr/local/cpanel/scripts/cpbackup</code> - run a legacy backup
<code>/usr/local/cpanel/scripts/cpbackup</code> - run a legacy backup
<code>/scripts/pkgacct <i>user</i></code> - backs up the entire specified cPanel account, including databases, e-mail, settings, etc. Replace "user" with the cPanel username to backup.





Revision as of 18:04, 19 December 2017

cPanel has a bunch of scripts in the /scripts folder.

For most of them, you can run: /scripts/script_name_here --help to see what the script does. (Except for upcp... --help is not available for it.)

Scripts

/scripts/whowns domain.com - Tells you which cPanel account owns the specified domain.

/scripts/upcp --force - Updates cPanel (use with caution)

/usr/local/cpanel/bin/checkallsslcerts - Checks All SSL certificates.

/usr/local/cpanel/bin/autossl_check --user $usernamehere - force Auto-SSL to check a specific account

/scripts/clear_orphaned_virtfs_mounts --clearall - Cleans the virtfs folders for users who no longer exist or who no longer use a jailed shell environment.


Backup:
/usr/local/cpanel/bin/backup --force - force a manual backup

/usr/local/cpanel/scripts/cpbackup - run a legacy backup

/scripts/pkgacct user - backs up the entire specified cPanel account, including databases, e-mail, settings, etc. Replace "user" with the cPanel username to backup.


Mail sizes showing incorrectly? Try this:
/scripts/generate_maildirsize --confirm --allaccounts --verbose $USER


Check RPMs and possibly re-install:
/scripts/check_cpanel_rpms


Database Grants
Weird database permission/authentication issues? Try restoring the database grants:
/usr/local/cpanel/bin/restoregrants --cpuser=$cpuser --db=mysql --all