Command reference
stcpdirectlink
Riversoft® STCP DirectLink executable. The package installs the /usr/local/bin/stcpdirectlink link, which points to /usr/local/stcpdirectlink/bin/stcpdirectlink-<version>.
Syntax: stcpdirectlink [options]
| Option | Default | Description |
|---|---|---|
-v | — | Shows the version and exits. |
-config | ../configs/config.json, relative to the executable directory | Configuration file path. See Parameter reference. |
-lang | ptb | Message language: ptb (Portuguese), enu (English) or esp (Spanish). |
-langfile | ../configs/messages.json, relative to the executable directory | Message file. |
-debugPath | — | Debug files directory. Takes precedence over applDebugPath; debug is written only when applDebug is greater than 0. |
-noService | — | Runs in the foreground, as an application. Use for tests and in containers. |
-installService | — | Installs the service with the given options. Windows only. |
-removeService | — | Removes the service. Windows only. |
Examples:
# Installed version
stcpdirectlink -v
# Foreground run, to test the configuration
stcpdirectlink -noService \
-config /usr/local/stcpdirectlink/configs/config.json \
-lang enu \
-langfile /usr/local/stcpdirectlink/configs/messages.jsonsystemd service
On Linux, the package installs the stcpdirectlink service at /usr/lib/systemd/system/stcpdirectlink.service and enables it at system startup:
[Unit]
Description=Riversoft STCP DirectLink Server
[Service]
ExecStart=/usr/local/bin/stcpdirectlink -config /usr/local/stcpdirectlink/configs/config.json -langfile /usr/local/stcpdirectlink/configs/messages.json -lang ptb -noService
WorkingDirectory=/usr/local/stcpdirectlink/bin
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.targetThe service is restarted automatically 3 seconds after a failure (Restart=always).
| Command | Purpose |
|---|---|
systemctl start stcpdirectlink | Starts the service. |
systemctl stop stcpdirectlink | Stops the service. |
systemctl restart stcpdirectlink | Restarts the service, for example after changing config.json. |
systemctl status stcpdirectlink | Shows the service state. |
systemctl enable stcpdirectlink | Enables automatic start with the system. |
journalctl -u stcpdirectlink | Shows the service messages recorded by systemd. |
To change startup options, such as the language, use an override file (systemctl edit stcpdirectlink) instead of editing the file installed by the package.