Skip to content

Commit 072af1b

Browse files
committed
feat: run agent as non-root user
1 parent 3fb82e5 commit 072af1b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

openrc-service.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description="CodeBench agent"
55
supervisor="supervise-daemon"
66
command="/usr/local/bin/agent"
77
pidfile="/run/agent.pid"
8+
command_user="codebench:codebench"
89

910
depend() {
1011
after net

setup-alpine.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ echo "root:root" | chpasswd
1717

1818
echo "nameserver 1.1.1.1" >>/etc/resolv.conf
1919

20+
addgroup -g 1000 -S codebench && adduser -u 1000 -S codebench -G codebench
21+
2022
rc-update add devfs boot
2123
rc-update add procfs boot
2224
rc-update add sysfs boot

0 commit comments

Comments
 (0)