diff options
author | n-connect <[email protected]> | 2023-03-03 01:11:26 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-03 01:11:26 +0100 |
commit | 0a8c39c11fb04480a0800fc2fe814f016ec87958 (patch) | |
tree | 6a6d2b108f818fe26bc2e8a809a678199ab2a250 | |
parent | 7dd812c79a7a95f375910045abac9f70a7a748bc (diff) | |
download | rustdesk-server-0a8c39c11fb04480a0800fc2fe814f016ec87958.tar.gz rustdesk-server-0a8c39c11fb04480a0800fc2fe814f016ec87958.zip |
hbbs logging to file
Logging enabled via file redirection (not syslog, as it can't tell/pass the logger program's name)
-rw-r--r-- | rcd/rustdesk-hbbs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/rcd/rustdesk-hbbs b/rcd/rustdesk-hbbs index 0d3576d..2b13080 100644 --- a/rcd/rustdesk-hbbs +++ b/rcd/rustdesk-hbbs @@ -33,8 +33,8 @@ pidfile=/var/run/rustdesk_hbbs.pid command=/usr/sbin/daemon procname=/usr/local/sbin/hbbs rustdesk_hbbs_chdir="/var/lib/rustdesk-server/" -rustdesk_hbbs_args="-r your.ip.add.ress -k _" -command_args="-f -p ${pidfile} /usr/bin/env ${procname} ${rustdesk_hbbs_args}" +rustdesk_hbbs_args="-r 130.255.77.37 -k _" +command_args="-p ${pidfile} -o /var/log/rustdesk-hbbs.log ${procname} ${rustdesk_hbbs_args}" start_precmd=rustdesk_hbbs_startprecmd @@ -52,6 +52,13 @@ rustdesk_hbbs_startprecmd() mkdir -m 770 ${rustdesk_hbbs_chdir}; chown ${rustdesk_hbbs_user}:${rustdesk_hbbs_group} ${rustdesk_hbbs_chdir}; fi + if [ -e /var/log/rustdesk-hbbs.log ]; then + chown -R ${rustdesk_hbbs_user}:${rustdesk_hbbs_group} /var/log/rustdesk-hbbs.log; + chmod 660 /var/log/rustdesk-hbbs.log; + else + install -o ${rustdesk_hbbs_user} -g ${rustdesk_hbbs_group} /dev/null /var/log/rustdesk-hbbs.log; + chmod 660 /var/log/rustdesk-hbbs.log; + fi } run_rc_command "$1" |