Entry points: every executable this product installs
CLI conventions is the other axis of this same
question: what a command inside hitechcloudcli should look like. This page
is about the executables themselves - what ends up on PATH (or at a fixed
path an outside mechanism names), what installs it, what invokes it, and
whether a human is ever meant to type it.
Since 4.0.1 every one of them is a Rust binary, published per architecture
beside each release (<name>-linux-amd64, <name>-linux-arm64) and listed
in the release's SHA256SUMS. Nothing is compiled on a server and no shell
script is installed as a command.
The inventory
Found by reading INSTALL.sh, the installer (hitechcloudcli server-install,
server/install.rs in the CLI repository), the updater (hitechcloudcli update, update/full.rs), the systemd unit templates under
hitechcloudpanel/configuration-native/systemd/, the units the CLI writes at
run time (dbgovernor, limits, user-backupset, ipmanager), and the sudoers
drop-in native/jail.rs writes.
| Binary | Installed at | Installed by | Invoked by | Human-typed? |
|---|---|---|---|---|
hitechcloudcli | /usr/local/bin/hitechcloudcli | INSTALL.sh downloads it, checks it against SHA256SUMS and runs its server-install, which installs it; hitechcloudcli update replaces it first, before anything else | Humans, cron, hooks, systemd ExecStart= lines, both panels | Yes - the CLI itself |
hitechcloud | /usr/local/bin/hitechcloud | installer and updater (the panel engine under its shipped name) | the subcommands other programs call (hash-password, version, rdap-scan, quota-report) | No |
hitechcloudpanel-engine | /usr/local/bin/hitechcloudpanel-engine | installer and updater | systemd (hitechcloud.service) - the whole user panel | No - service |
hitechadmin | /usr/local/bin/hitechadmin | installer and updater (the admin engine under its shipped name) | server, version, api-endpoints, dns-cluster by argv[0] | No |
hitechcloudadmin-engine | /usr/local/bin/hitechcloudadmin-engine | installer and updater | systemd (hitechadmin.service runs hitechcloudadmin-engine start) - the whole admin panel | No - service |
hitechcompliance | /usr/local/admin/hitechcompliance (not on the interactive PATH) | installer (hitechcompliance-linux-<arch>) and updater | hitechcloudcli compliance-run/compliance-retention (compliance/run.rs) | No - a helper the CLI execs |
hitechcloudwaf | /usr/local/bin/hitechcloudwaf | hitechcloudcli webfirewall install, and the updater | systemd (hitechcloud-waf.service) | No - service |
hitechcloud-meet | /usr/local/bin/hitechcloud-meet | hitechcloudcli meet install | systemd (hitechcloud-meet.service) | No - service |
sentinel | /usr/local/bin/sentinel | the CLI's service installer, from the release's sentinel-linux-<arch> | systemd | No - service. Unrelated to the hitechcloudcli sentinel subcommand beyond the name. |
hitechcloud-shell | /usr/local/bin/hitechcloud-shell | a symlink to hitechcloudcli (nativeconf::link_entry_points, run by the installer and the updater) | the kernel, as a hosting account's login shell | No - only ever run as a shell |
hitechcloud-jail | /usr/local/bin/hitechcloud-jail | the same symlink step | the web terminal, the account cron runner, the sudoers rule native/jail.rs writes | No |
hitechcloud-rustcli | (nothing installs it) | An updater from before 4.0.1 fetches the CLI under this old name; the 4.0.1 UPDATE.sh and the bash dispatcher (below) install it over /usr/local/bin/hitechcloudcli. An existing one is left alone. | nothing in 4.0.1 | No |
hitechcli | (nowhere - removed) | the installer deletes /usr/local/hitechcli and /usr/local/bin/hitechcli if found | nothing | No |
The two entry-point names are the CLI binary itself: run as
hitechcloud-jail or -hitechcloud-shell, it is that command, as if called
with hitechcloudcli --direct jail / restricted-shell.
systemd runs hitechcloudcli directly. native/dbgovernor.rs,
native/limits.rs and user/backupset.rs each write a oneshot unit whose
ExecStart= is /usr/local/bin/hitechcloudcli <command> ..., so those runs
go through the dispatcher personality (history, hooks) like a human's.
One binary, two personalities
hitechcloudcli decides once, in main(), how it was asked:
- as
hitechcloudcli(humans, hooks, cron, systemd): the dispatcher - root check,hitechcloudcli.log, pre/post hooks from/etc/hitechcloud/hitechcloud/hooks,--help, theerrorspecial case - which runs the command by re-executing itself (/proc/self/exe) with--directin front; - with
--direct(or under any other name): the command runner, with no root check, history or hooks. The panels call it this way to read JSON.
The CLI tree
/usr/local/hitechcloudcli holds only what the CLI reads at run time: the
files .github/scripts/cli_runtime_files.txt lists (the command list
aliases.txt, error.py, the admin's csf-ui.pl, and the bash dispatcher
below). The release's runtime.tar.gz carries exactly those - the CLI's
source is not shipped - and release.yml refuses a bundle with any .rs,
.go or crate manifest in it. The installer and the updater mirror the
tree from the bundle, keeping aliases.txt and imunify/, which the server
writes itself.
hitechcloudpanel/hitechcloudcli-scripts in this repository is a copy of the
CLI repository (everything but cli/). hitechcloud-devtools sync-cli-copy --check fails CI when the two differ.
The bash dispatcher, and updates from before 4.0.1
The CLI repository still has one shell file, hitechcloudcli, and the
bundle still ships it, for one reason: an updater from 3.0.0-3.7.x (a bash
update.sh) copies the release's tree, installs that file as
/usr/local/bin/hitechcloudcli, and fetches the compiled CLI only as
hitechcloud-rustcli. Two things make such a server end up with a working
CLI:
- the release's
version/<v>/UPDATE.sh, generated by.github/scripts/legacy_update_sh.py, installs the compiled CLI over the dispatcher before it runshitechcloudcli --direct update --migrate <v>; - the dispatcher itself hands every command to a compiled CLI it finds
(
hitechcloud-rustcli, orhitechcloudcli), installing it over itself first, so cron, the panels and the update timer stop reaching the script.
A candidate counts only when the file it resolves to starts with the ELF
magic: on newer servers hitechcloud-rustcli is a symlink to
hitechcloudcli, and running a link back to the script would hand the
command to itself, one bash deeper each time.
INSTALL.sh (the one other shell file, a POSIX sh bootstrap) never
installs the dispatcher: it downloads hitechcloudcli-linux-<arch>, checks
it against the release's SHA256SUMS, and hands over to its
server-install.
The rule: what may ever become a new binary
Nothing, unless an outside mechanism demands a binary path and cannot be
satisfied any other way - a login shell field, a sudoers target, a systemd
ExecStart, a kernel-level exec. Everything else is a subcommand, and an
entry point an outside mechanism needs is a symlink to the CLI, not a new
program. The hitechcli removal is the precedent for retiring a name: add
the replacement, let it ship for a release, then delete the old name from
every install path.
Testing
- The CLI repository's
cargo test --release(cli/tests/shell_dispatcher.rscovers the dispatcher's hand-over and the 3.x update sequence). hitechcloudpanel/engine/tests/repo_guards.rs: the legacyUPDATE.sh, the runtime bundle's contents, the demo deploy installing the compiled CLI..github/scripts/no_shell_check.py(run by the native-stack workflow): shell found by its first line, in this repository and its submodules; onlyINSTALL.shand the dispatcher may stay.