Skip to content

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]

OptionDefaultDescription
-v—Shows the version and exits.
-config../configs/config.json, relative to the executable directoryConfiguration file path. See Parameter reference.
-langptbMessage language: ptb (Portuguese), enu (English) or esp (Spanish).
-langfile../configs/messages.json, relative to the executable directoryMessage 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.json

systemd 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.target

The service is restarted automatically 3 seconds after a failure (Restart=always).

CommandPurpose
systemctl start stcpdirectlinkStarts the service.
systemctl stop stcpdirectlinkStops the service.
systemctl restart stcpdirectlinkRestarts the service, for example after changing config.json.
systemctl status stcpdirectlinkShows the service state.
systemctl enable stcpdirectlinkEnables automatic start with the system.
journalctl -u stcpdirectlinkShows 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.