# Minute heartbeat for a licensed (customer) panel.
#
# WHY A SECOND CRON: alpha-license does the real work once a day — it refreshes
# entitlements and keeps the grace window from expiring. This one only tells the
# vendor the server is alive, so "last seen" reads in minutes instead of "some
# time yesterday". Running the full refresh every minute would be 1,440 licence
# validations per server per day for a value that is only ever displayed.
#
# Runs as www-data because it reads /var/www/alpha-private/license-client.json,
# which the panel owns; root would work but would be the wrong user to normalise.
#
# The guard keeps this harmless on the VENDOR's own panel, where
# bin/license-ping.php does not exist (the licence client is applied by
# Distribution/build.sh, so only customer builds have it) — provisioning installs
# every file in cron/ unconditionally.
#
# ⚠️ Output goes nowhere on purpose. A minute cron that logs a line per run fills
# a disk with "ok"; real failures surface on the License screen, which shows the
# last error and how long the entitlement cache has left.
* * * * * www-data [ -f /var/www/alpha/bin/license-ping.php ] && /usr/bin/php /var/www/alpha/bin/license-ping.php >/dev/null 2>&1
