Lecteur Markdown
UPDATER_DOCUMENTATION_EN
Feature: Updater #
Automatic update client for BeamReactor installations. Compares local files with the remote manifest, performs a dry-run before any modification and creates backups before updating.
---
Installation and Configuration #
Via FTP: Upload the `updater/` directory into `/plugins/`.
Via package manager: Select `updater` from the available plugins list.
Paths:
- Main plugin: `/plugins/updater/updater.php`
- Configuration: `/plugins/updater/conf/updater.conf.inc.php`
Configuration parameters (`updater.conf.inc.php`):
| Variable | Default | Description |
|---|---|---|
| `$basedatadisplay` | `'yes'` | Display in management interface |
| `$basedisplevel` | `BASE_LEVEL_ADMIN` | Minimum level to view |
| `$ftype` | `3` | Plugin type (system) |
| `UPDATE_SERVER` | `https://devarea.beamreactor.com` | Update server |
| `BACKUP_DIR` | `$cfg[20]/backups/` | Backup directory |
| `DRY_RUN` | `false` | Simulation mode (test without writing) |
| `AUTO_SELECT` | `true` | Automatic file selection for update |
Authentication:
- `$site_id` = `$cfg[1]`
- `$auth_token` = `hash('sha256', $cfg[23] . $site_id)`
The update operation itself requires `UPDATER_LEVEL_OVERMIND`.
---
Usage #
Update Process #
1. Manifest retrieval — list of files with expected hash from `UPDATE_SERVER`.
2. Comparison — each local file is hashed and compared against the manifest.
3. Dry-run — operation simulation before actual execution.
4. Backup — files to be replaced are copied to `BACKUP_DIR`.
5. Update — replacement of modified files.
Remote Endpoint Consulted #
UPDATE_SERVER/index.php?obj=versions.rss&token=X&site_id=Y
---
Hooks and Entry Points #
?obj=updater.php — Main interface (comparison and update)
---
Dependencies #
- `Beamreactor\Sanitizer\Parser`
- PHP cURL extension — required for the remote manifest
- Write permissions on installation directories — required for effective update
- `$cfg[1]` (site_id) and `$cfg[23]` (secret key) — authentication towards the server