- Add lib/sysbackup.sh and lib/sysrestore.sh for system-level
backup and restore of WHM/cPanel config, packages, and cron jobs
- Wire cmd_sysbackup and cmd_sysrestore into bin/gniza
- Add --sysbackup flag to cmd_backup: runs system backup after all
account backups complete
- Add SYSBACKUP schedule config key so cron jobs can include
--sysbackup automatically via build_cron_line()
- Add "Include system backup" toggle to WHM schedule form
- Revert sysbackup toggle from remotes.cgi (belongs in schedules)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The sysbackup toggle is now available for both add and edit flows,
so users can trigger a system backup against any existing remote.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When adding a new remote, a toggle lets the user immediately run
gniza sysbackup against the new remote. The backup forks to
background with output logged to /var/log/gniza/sysbackup-<name>.log.
Toggle is hidden on edit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clicking any column header sorts the table rows. Supports text and
numeric sorting with ascending/descending toggle and arrow indicators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WHM styles override <a> tag padding, making anchor-based buttons
larger than native buttons. Using <button> elements everywhere
ensures uniform button sizing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom DaisyUI theme using the provided color palette:
- Primary: dark blue rgb(5,61,142)
- Secondary/Error: orange rgb(238,118,45)
- Accent/Warning: yellow rgb(254,204,0)
- Info: teal rgb(90,168,189)
- Neutral: darker blue rgb(2,44,105)
- Base: white/gray
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace raw cron entries with descriptions like "Every hour, to rasp"
or "Daily at 02:00, all remotes". Add cron_to_human() to Cron.pm.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WHM CSS adds margin to checked radio inputs, causing the active
button in join groups to shift down. Added m-0 class to all
join-item radio buttons to override.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline style with Tailwind inline-flex items-stretch classes
on join button groups. Rebuild CSS with new safelist entries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WHM CSS causes the active/checked button in DaisyUI join groups
to shift down. Added inline display:inline-flex;align-items:stretch
to all join containers in remotes.cgi and restore.cgi.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The forked child stayed in the CGI's process group and got killed
when Apache cleaned up the CGI process. Now uses double-fork with
POSIX::setsid() to fully daemonize the backup process.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
REMOTE_HOST, REMOTE_PORT, REMOTE_USER, REMOTE_BASE, BWLIMIT,
RETENTION_COUNT, and RSYNC_EXTRA_OPTS were referenced without
defaults in _save_remote_globals(), causing "unbound variable"
errors under set -u when called before any remote was loaded
(e.g., gniza remote list).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gniza backup requires /etc/gniza/gniza.conf to exist. The WHM plugin
only created remote configs in remotes.d/ but not the main config,
causing "Config file not found" errors. Now creates it with defaults
when adding a remote if it doesn't exist.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a "Run Now" button in each schedule's Actions column that
triggers the backup in the background, logging to the same cron
log file. Forks the process and redirects immediately.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Send email via curl SMTP when SMTP_HOST is configured, falling back
to system mail/sendmail when empty. NOTIFY_EMAIL now accepts
comma-separated addresses. WHM Settings page gets an SMTP card
with Send Test Email button.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When adding a remote via WHM, create the base directory structure
on the remote server (matching gniza init remote CLI behavior).
Creates $REMOTE_BASE/<hostname>/accounts/ via SSH mkdir or rclone mkdir.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>