CLI Reference
The cs-routeros-bouncer binary has a small command surface: it runs the bouncer, prints version/help information, or performs systemd setup/removal tasks.
Run the bouncer
Section titled “Run the bouncer”Run with a configuration file:
cs-routeros-bouncer -c /etc/cs-routeros-bouncer/cs-routeros-bouncer.yamlRuntime flags:
| Flag | Description |
| ---------- | ----------------------------------- |
| -c | Path to the YAML configuration file |
| -version | Print version, commit, build date |
The binary does not load a host config path implicitly when run directly. Pass -c unless all required settings are supplied via environment variables. The systemd installer and Docker image provide their own -c path.
version
Section titled “version”Print build information:
cs-routeros-bouncer versionThe flag form is also supported:
cs-routeros-bouncer -versionInstalls the current binary as a systemd service:
sudo ./cs-routeros-bouncer setupWhat it does:
- Copies the binary to the selected install path.
- Creates the config directory.
- Writes an example config if one does not already exist.
- Writes
/etc/systemd/system/cs-routeros-bouncer.service. - Runs
systemctl daemon-reload, enables the service, and starts it.
Flags:
| Flag | Default | Description |
| ------------- | ------------------------------------ | --------------------------------- |
| -bin | /usr/local/bin/cs-routeros-bouncer | Installation path for the binary |
| -config-dir | /etc/cs-routeros-bouncer | Directory for configuration files |
Example with custom paths:
sudo ./cs-routeros-bouncer setup \ -bin /opt/cs-routeros-bouncer/cs-routeros-bouncer \ -config-dir /etc/cs-routeros-bounceruninstall
Section titled “uninstall”Stops and removes the systemd service and installed binary:
sudo cs-routeros-bouncer uninstallFlags:
| Flag | Default | Description |
| ------------- | ------------------------------------ | ------------------------------------------- |
| -bin | /usr/local/bin/cs-routeros-bouncer | Installed binary path to remove |
| -config-dir | /etc/cs-routeros-bouncer | Config directory to remove with -purge |
| -purge | false | Also remove the configured config directory |
By default, uninstall keeps config files. If setup used a custom -bin or -config-dir, pass the same values to uninstall so the correct binary and config directory are targeted.
Remove config files too:
sudo cs-routeros-bouncer uninstall -purgePurge a custom install path:
sudo cs-routeros-bouncer uninstall \ -bin /opt/cs-routeros-bouncer/cs-routeros-bouncer \ -config-dir /opt/cs-routeros-bouncer/config \ -purgePrint usage information:
cs-routeros-bouncer helpThe usual help flags are also supported:
cs-routeros-bouncer -hcs-routeros-bouncer --help