Open sunlewuyou opened 3 months ago
Ok.
Do you have suggestions for a fix?
Ok.
Do you have suggestions for a fix?
I found out that rsyslog can be used. I hope the script can be improved. Thank you!
ok, if anyone can find out the input and make suggestions that will be fine, I dont use Centos and dont have loads of time to find the fix
@dinger1986 My Configuration:
# cat /etc/systemd/system/rustdesksignal.service
[Unit]
Description=Rustdesk Signal Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/opt/rustdesk/hbbs -k _
WorkingDirectory=/opt/rustdesk/
User=root
Group=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=signalserver
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
# cat /etc/rsyslog.d/signalserver.conf
if $programname == 'signalserver' then /var/log/rustdesk/signalserver.log
& stop
if $programname == 'signalserver' then /var/log/rustdesk/signalserver.error
& stop
# cat /etc/systemd/system/rustdeskrelay.service
[Unit]
Description=Rustdesk Relay Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/opt/rustdesk/hbbr -k _
WorkingDirectory=/opt/rustdesk/
User=root
Group=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=relayserver
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
# cat /etc/rsyslog.d/relayserver.conf
if $programname == 'relayserver' then /var/log/rustdesk/relayserver.log
& stop
if $programname == 'relayserver' then /var/log/rustdesk/relayserver.error
& stop
The systemd version is too old and does not support directly outputting StandardOutput and StandardError to files.