docs: update Linux installation and command-line options documentation for clarity and consistency authored by tem_invictus's avatar tem_invictus
...@@ -22,7 +22,7 @@ oscam -b -c /etc/oscam ...@@ -22,7 +22,7 @@ oscam -b -c /etc/oscam
oscam -d 255 oscam -d 255
# Start with custom directories and pidfile # Start with custom directories and pidfile
oscam -b -c /etc/oscam -t /var/tmp/oscam -B /var/run/oscam.pid oscam -b -c /etc/oscam -t /var/tmp/oscam -B /run/oscam/oscam.pid
``` ```
## Directory Configuration ## Directory Configuration
...@@ -46,25 +46,30 @@ Control how OSCam runs as a system process. ...@@ -46,25 +46,30 @@ Control how OSCam runs as a system process.
| Option | Description | Notes | | Option | Description | Notes |
| --- | --- | --- | | --- | --- | --- |
| `-b, --daemon` | Run as background daemon | Standard mode for production | | `-b, --daemon` | Run as background daemon | Standard mode for normal non-STAPI builds |
| `-f, --foreground` | Run in foreground | Only on STAPI/STAPI5 systems | | `-f, --foreground` | Run in foreground | Available only on STAPI/STAPI5 builds |
| `-B, --pidfile <file>` | Create PID file at specified path | Useful for init scripts | | `-B, --pidfile <file>` | Create PID file at specified path | Useful for init scripts |
| `-w, --wait <seconds>` | Wait for system clock sync at startup | Default: `60` seconds | | `-w, --wait <seconds>` | Wait for system clock sync at startup | Default: `60` seconds |
**Daemon vs Foreground:** **Daemon vs Foreground:**
- Use `-b` (daemon) for most systems to run OSCam in the background - On standard builds, use `-b` to run OSCam in the background
- Use `-f` (foreground) on STAPI/STAPI5 systems or when debugging - On STAPI/STAPI5 builds, OSCam exposes `-f` instead of `-b`
- For debugging on standard builds, simply omit `-b` and run OSCam attached to the terminal
**Example:** **Example:**
```bash ```bash
oscam -b -B /var/run/oscam.pid -w 30 oscam -b -B /run/oscam/oscam.pid -w 30
``` ```
If you do not pass `-B`, OSCam falls back to its configured `pidfile` setting or a default PID file in its temporary directory.
For the `systemd` service example used in [Linux Installation](pages/installation/linux-installation), use `/run/oscam/oscam.pid` so it matches `RuntimeDirectory=oscam`. Outside that setup, any writable PID-file path is acceptable.
## Restart Behavior ## Restart Behavior
Configure how OSCam handles restart requests (requires WebIf module). Configure how OSCam handles restart requests. These options are only available when OSCam is built with WebIf support.
| Option | Description | | Option | Description |
| --- | --- | | --- | --- |
...@@ -207,7 +212,7 @@ oscam -V ...@@ -207,7 +212,7 @@ oscam -V
oscam -b \ oscam -b \
-c /etc/oscam \ -c /etc/oscam \
-t /var/tmp/oscam \ -t /var/tmp/oscam \
-B /var/run/oscam.pid \ -B /run/oscam/oscam.pid \
-r 2 \ -r 2 \
-I oscam-prod -I oscam-prod
``` ```
...@@ -246,9 +251,10 @@ oscam -d 65535 \ ...@@ -246,9 +251,10 @@ oscam -d 65535 \
### For Production ### For Production
- Always use `-b` (daemon mode) on standard systems - Always use `-b` (daemon mode) on standard non-STAPI systems
- Set `-r 2` for automatic recovery from crashes - Set `-r 2` for automatic recovery from crashes
- Use `-B` with pidfile for proper init script integration - Use `-B` with pidfile for proper init script integration
- Keep the PID-file path aligned with your service manager, for example `/run/oscam/oscam.pid` when using `RuntimeDirectory=oscam`
- Keep debug level at `0` unless troubleshooting - Keep debug level at `0` unless troubleshooting
### For Testing ### For Testing
...@@ -268,8 +274,8 @@ oscam -d 65535 \ ...@@ -268,8 +274,8 @@ oscam -d 65535 \
**STAPI/STAPI5 Systems:** **STAPI/STAPI5 Systems:**
- Use `-f` (foreground) instead of `-b` (daemon) - These builds expose `-f` (foreground) instead of `-b` (daemon)
- These platforms require foreground operation - Do not expect both switches to be available in the same build
**Embedded Devices:** **Embedded Devices:**
... ...
......