gluon-radvd: don't run as root

This commit is contained in:
Matthias Schiffer 2014-01-14 19:06:28 +01:00
parent 5241565a79
commit 1c9dec091e
2 changed files with 10 additions and 1 deletions

View File

@ -4,9 +4,13 @@ START=50
SERVICE_USE_PID=1 SERVICE_USE_PID=1
SERVICE_NAME=gluon-radvd SERVICE_NAME=gluon-radvd
SERVICE_PID_DIR=/var/run/gluon-radvd
SERVICE_PID_FILE="$SERVICE_PID_DIR"/gluon-radvd.pid
start() { start() {
service_start /usr/sbin/radvd -C /lib/gluon/radvd/radvd.conf -m stderr_syslog -p /var/run/gluon-radvd.pid mkdir -p "$SERVICE_PID_DIR"
chown gluon-radvd "$SERVICE_PID_DIR"
service_start /usr/sbin/radvd -C /lib/gluon/radvd/radvd.conf -m stderr_syslog -u gluon-radvd -p "$SERVICE_PID_FILE"
} }
stop() { stop() {

View File

@ -0,0 +1,5 @@
#!/bin/sh
. /lib/gluon/functions/users.sh
add_user gluon-radvd 801