mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2025-01-23 19:11:34 +08:00
hbbr logging to file
Logging enabled via file redirection (not syslog, as it can't tell/pass the logger program's name)
This commit is contained in:
parent
9d524443ec
commit
7dd812c79a
@ -15,6 +15,7 @@
|
||||
# Default is "root".
|
||||
# rustdesk_hbbr_group (string): Set group that rustdesk_hbbr will run under
|
||||
# Default is "wheel".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=rustdesk_hbbr
|
||||
@ -33,7 +34,7 @@ command=/usr/sbin/daemon
|
||||
procname=/usr/local/sbin/hbbr
|
||||
rustdesk_hbbr_chdir="/var/lib/rustdesk-server/"
|
||||
rustdesk_hbbr_args="-k _"
|
||||
command_args="-f -p ${pidfile} /usr/bin/env ${procname} ${rustdesk_hbbr_args}"
|
||||
command_args="-p ${pidfile} -o /var/log/rustdesk-hbbr.log ${procname} ${rustdesk_hbbr_args}"
|
||||
|
||||
start_precmd=rustdesk_hbbr_startprecmd
|
||||
|
||||
@ -48,8 +49,16 @@ rustdesk_hbbr_startprecmd()
|
||||
chown -R ${rustdesk_hbbr_user}:${rustdesk_hbbr_group} ${rustdesk_hbbr_chdir};
|
||||
chmod -R 770 ${rustdesk_hbbr_chdir};
|
||||
else
|
||||
mkdir -m 7et nonu
|
||||
0 ${rustdesk_hbbr_chdir};
|
||||
mkdir -m 770 ${rustdesk_hbbr_chdir};
|
||||
chown ${rustdesk_hbbr_user}:${rustdesk_hbbr_group} ${rustdesk_hbbr_chdir};
|
||||
fi
|
||||
if [ -e /var/log/rustdesk-hbbr.log ]; then
|
||||
chown -R ${rustdesk_hbbr_user}:${rustdesk_hbbr_group} /var/log/rustdesk-hbbr.log;
|
||||
chmod 660 /var/log/rustdesk-hbbr.log;
|
||||
else
|
||||
install -o ${rustdesk_hbbr_user} -g ${rustdesk_hbbr_group} /dev/null /var/log/rustdesk-hbbr.log;
|
||||
chmod 660 /var/log/rustdesk-hbbr.log;
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user