From faaa042f9934c8c47505982702974cf928099fb2 Mon Sep 17 00:00:00 2001 From: xtaci Date: Sat, 3 Aug 2024 19:38:08 +0800 Subject: [PATCH] run as nobody in freebsd rc script --- dist/kcptun.freebsd.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/kcptun.freebsd.dist b/dist/kcptun.freebsd.dist index 91fc28abc..2a16036ff 100755 --- a/dist/kcptun.freebsd.dist +++ b/dist/kcptun.freebsd.dist @@ -4,7 +4,7 @@ # REQUIRE: LOGIN # KEYWORD: shutdown -# FreeBSD startup script, rename and put this file to +# FreeBSD startup script, rename and put this file to # /usr/local/etc/rc.d/kcptun # and, run: # chmod +x /usr/local/etc/rc.d/kcptun @@ -21,6 +21,6 @@ load_rc_config $name # Loads the config file, if relevant. dir="/home/xtaci" # change this to the directory where kcptun binaries are. command="/usr/sbin/daemon" pidfile="/var/run/${name}.pid" -command_args="-c -f -S -P ${pidfile} -r $dir/client_freebsd_amd64 -c $dir/local-ss.json" +command_args="-u nobody -c -f -S -P ${pidfile} -r $dir/client_freebsd_amd64 -c $dir/local-ss.json" run_rc_command "$1"