Page tree
Skip to end of metadata
Go to start of metadata

Overview

This RPM includes scripts that allow you to work with EasyApache 4 (EA4) from the command line rather than in WHM's EasyApache 4 interface (Home >> Software >> EasyApache 4).

The /usr/local/bin/ea_current_to_profile script

The /usr/local/bin/ea_current_to_profile script creates a new profile based on your current EasyApache 4 configuration.

To use this script, run the following command:

/usr/local/bin/ea_current_to_profile [options]

Arguments

OptionDescriptionExample
--helpDisplay a help message. /usr/local/bin/ea_current_to_profile --help
--output=profile_name

Create a profile from EasyApache 4's current configuration.

In this argument, profile_name represents the name, which includes the path and extension, of the profile file that you wish to create.

Important:

  • You must include the .json extension in your profile file's name.
  • Your new profile will only display in the EasyApache 4 interface if you use the /etc/cpanel/ea4/profiles/custom/ path.
  • If you do not specify a path, the system creates the file in your current working directory.
 /usr/local/bin/ea_current_to_profile --output=/etc/cpanel/ea4/profiles/custom/myprofile.json

Note:

If you do not pass an argument, the script creates the profile in the /etc/cpanel/ea4/profiles/custom directory and names the file automatically, then adds it to the list of available custom profiles in the EasyApache 4 interface (Home >> Software >> EasyApache 4). The file's name will resemble the following example: 

current_state_at_2015-08-28_10:10:04.json

The /usr/local/bin/ea_install_profile script

The /usr/local/bin/ea_install_profile script provisions a profile, but from the command line rather than the EasyApache 4 interface.

To use this script, run the following command:

/usr/local/bin/ea_install_profile [--install] profile_file

Notes:

  • You must pass the full path to the file that contains the profile.
  • If you pass the --install option, the system provisions the profile on your system.
  • If you do not pass the --install option, the system displays the changes it will make if you provision the profile.

The /usr/local/bin/ea_sync_user_phpini_settings script

The /usr/local/bin/ea_sync_user_phpini_settings script syncs the php.ini file in a user's document root with the corresponding .user.ini and .htaccess files that also exist in that document root. This ensures that the user's PHP configuration behaves as expected.

Note:

Only the root user can run this script.

To use this script, run the following command:

/usr/local/bin/ea_sync_user_phpini_settings [options]
OptionDescriptionExample
--helpDisplays a help message.
/usr/local/bin/ea_sync_user_phpini_settings --help
--user=username

Sync the specified user's INI files.

Note:

You can pass this option multiple times.

/usr/local/bin/ea_sync_user_phpini_settings --user=user1 --user-user2
--all-usersSync the INI files for all users on the system.
/usr/local/bin/ea_sync_user_phpini_settings --all-users

 

Other tools

The ea-cpanel-tools package also contains the following tools:

  • The EasyApache 4 Recommendations system, which provides a variety of recommendations about the packages you can select. For more information, read our EasyApache 4 Recommendations documentation. 
  • The ea_convert_php_ini script, which converts a user's existing php.ini file to one that EasyApache 4 can use if the user's PHP version uses suPHP. This conversion happens during the EasyApache 3 to EasyApache 4 migration process. 

    Important:

    We strongly recommend that you do not manually execute this script.