Diagnostics with check.sh
Check every HWD POS server component and repair whatever is missing or misconfigured.
What check.sh does
check.sh reviews the main components of an HWD POS server, prints a ✓ / ✗ report, and then lets you install or repair the ones that are missing or misconfigured. It is useful whenever an installation stopped halfway or someone changed the server configuration.
It is safe to run as many times as you like: it does not delete data.
Running it
You can run the local copy that the installer leaves on the server, or run the published version directly from the network.
sudo bash /var/www/HWDPOS/deploy/check.shBoth show the report and then open the repair menu.
Report only (change nothing)
Set CHECK_ONLY=1 to see the diagnosis without installing or changing anything:
# Local copy
sudo CHECK_ONLY=1 bash /var/www/HWDPOS/deploy/check.sh
# From the network
curl -fsSL https://3r.com.pa/hwdpos_inst/check.sh | sudo CHECK_ONLY=1 bashYou can also run it from the server panel: sudo hwdpanel → option 10) Diagnostics (check.sh). See hwdpanel.
What it checks
- PHP and its extensions.
- The PHP-FPM version actually in use (not just the
phpcommand in the terminal). - MariaDB.
- The web server (Apache or Nginx) and the site configuration.
- The HWD POS database.
- CUPS.
- Chrome/Chromium (it runs the browser as the web user to confirm it really works).
- The print worker
hwpos-printand the plugins worker. - The local admin panel
hwdpanel. - The HWD POS code.
- The site port — the port that is actually configured, not assumed to be 80.
The repair menu
After the report, a menu lists the components. Re-checks run after each installation.
| Key | Action |
|---|---|
| A number | Install or repair that component. |
| T | Install or repair everything that is missing. |
| U | Update the hwdpanel panel from the network. |
| S | Exit. |
If the hwdpanel command is missing (for example after a partial installation), check.sh reinstalls it from the menu entry for the admin panel.
Updating hwdpanel
check.sh can also update the panel directly:
sudo bash /var/www/HWDPOS/deploy/check.sh --update-panelBefore replacing the local copy, it makes a .bak backup, checks the syntax of the new file, and only replaces the local version if the check passes.
Installation modes
check.sh detects the mode of the server (all-in-one, web only or database only) from what is installed, and adapts its checks:
- On a web-only server it does not flag the missing local MariaDB as an error; it tests the remote database instead. Pass its address with
DB_HOST=<ip>. - On a database-only server it checks MariaDB and that it is listening on port 3306.
You can force the mode with MODE=web, MODE=db or MODE=all:
sudo MODE=web DB_HOST=10.0.0.5 bash /var/www/HWDPOS/deploy/check.shOther variables it accepts: PHP_VER, APP_DIR, DB_NAME, DB_USER, DOMAIN. See Installer variables.
Ubuntu/Debian versus AlmaLinux
check.sh works on both supported families:
| Ubuntu / Debian | AlmaLinux / Rocky / RHEL / CentOS | |
|---|---|---|
| Package check | dpkg (e.g. php8.3-fpm, phpX.Y-<extension>) | rpm (a single php-fpm; pdo_mysql comes inside php-mysqlnd) |
| Repair | Installs with apt | Runs install-almalinux.sh, which also puts SELinux and the firewall in order |
If check.sh showed ✗ on everything on Rocky/Alma/CentOS, you were using an old version that queried packages with dpkg. Download it again; the current version uses rpm.