It sorts by name. If there is a numeric prefix (e.g. 007.bond.json
) it is removed from display (bond
).
default.json
will be made to be first regardless of other names via WPX-1874.
Make different EA4 profiles available to the EA4 UI/CLI based on some factor like license type or if a plugin is installed (anything really).
Doing the logic in ULC would be complicated and would hit the “ULC update problem”.
Since the pkg built for an OS will own the same files we can’t simply munge them in post because it’d look like the pkg’s files were modified. Making them config files compounds the problem.
Instead of installing directly to /etc/cpanel/ea4/profiles/cpanel/
we:
- Install directly to
/opt/cpanel/ea-profiles-cpanel/
. - Have a script that ensures
/etc/cpanel/ea4/profiles/cpanel/
contains the correct symlinks to/opt/cpanel/ea-profiles-cpanel/
for the server based on its state at that moment./opt/cpanel/ea-profiles-cpanel/bin/update-available-profiles
- Call that script in post (install and upgrade).
- On uninstall remove
/etc/cpanel/ea4/profiles/cpanel/
- Because the pkg does not own this directory (and can’t because deb has no equiv to RPM’s
%DIR
)
- Because the pkg does not own this directory (and can’t because deb has no equiv to RPM’s
- When the servers state changes that script will need run also.
- We don’t really support license type changes so that is moot.
Other vendors can do the same, just need to s/cpanel/your-name/g
in the info above (except /etc/cpanel/ea4/profiles/cpanel/
which would need to be /etc/cpanel/ea4/profiles/vendor/your-name/
).
If readlink -n /usr/local/cpanel/server.type
is <SERVERTYPE>
and there are files globbed to /opt/cpanel/ea-profiles-cpanel/server-type-<SERVERTYPE>-<PROFILENAME>.json
then it will symlink that file to .json in the profiles directory. Please make sure you have a profile with the name default.json
.
Note: server-type must not contain a dash, so wp2
is good, whereas foo-bar
is bad.
Otherwise /etc/cpanel/ea4/profiles/cpanel/
will contain all profiles *.json
that are in /opt/cpanel/ea-profiles-cpanel
..