|
3 | 3 | ## Dependencies |
4 | 4 |
|
5 | 5 | - A web server with a web environment available (e.g., Apache, Nginx) |
6 | | -- PHP 8.2 or higher |
| 6 | +- A [supported PHP version](https://www.php.net/supported-versions.php) (not end of life) |
7 | 7 | - MySQL or MariaDB database server |
8 | 8 | - Composer (PHP dependency manager) |
9 | 9 | - Node.js and npm (Node Package Manager) |
@@ -34,7 +34,7 @@ Install the following Ubuntu / Debian packages, or the equivalent for your opera |
34 | 34 |
|
35 | 35 | 1. Copy the OpenBroadcaster Server files to your web server's document root directory. |
36 | 36 |
|
37 | | -2. Navigate to the cloned repository directory within the web document root and run the following command to install PHP and JavaScript dependencies. |
| 37 | +2. Navigate to the web document root and run the following command to install PHP and JavaScript dependencies. |
38 | 38 |
|
39 | 39 | ``` |
40 | 40 | composer install && npm install |
@@ -62,8 +62,31 @@ tools/cli/ob updates run all |
62 | 62 | tools/cli/ob passwd admin |
63 | 63 | ``` |
64 | 64 |
|
65 | | -9. Set up a cron job to run the `cron.php` script regularly. This script is responsible for clearing old cache and unused upload files. The following is an example crontab entry. |
| 65 | +9. Set up a service (or similar) to run required background tasks such as generating thumbnails and cache management. This service should ensure that `tools/bli/cli cron monitor` is running continously. |
| 66 | + |
| 67 | +For example, set up a service, `/etc/systemd/system/ob.service`, as follows: |
| 68 | + |
| 69 | +``` |
| 70 | +[Unit] |
| 71 | +Description=OB Background Tasks |
| 72 | +After=network.target |
| 73 | +
|
| 74 | +[Service] |
| 75 | +Type=simple |
| 76 | +User=obuser |
| 77 | +ExecStart=/path/to/ob/tools/cli/ob cron monitor |
| 78 | +Restart=always |
| 79 | +RestartSec=10 |
| 80 | +
|
| 81 | +[Install] |
| 82 | +WantedBy=multi-user.target |
| 83 | +``` |
| 84 | + |
| 85 | +Then run: |
66 | 86 |
|
67 | 87 | ``` |
68 | | -* * * * * /path/to/openbroadcaster/tools/cli/ob cron run |
| 88 | +systemctl daemon-reload |
| 89 | +systemctl enable ob |
| 90 | +systemctl start ob |
69 | 91 | ``` |
| 92 | + |
0 commit comments