support for running as an alternate OS user (defaults to root)
This commit is contained in:
parent
d4b5499f38
commit
ee796d4add
2 changed files with 6 additions and 1 deletions
|
|
@ -35,7 +35,11 @@ start() {
|
|||
[ "$FORCE_LOCK" == "Y" ] && ARGS="$ARGS --force-lock"
|
||||
[ "$KOJIRA_DEBUG" == "Y" ] && ARGS="$ARGS --debug"
|
||||
[ "$KOJIRA_VERBOSE" == "Y" ] && ARGS="$ARGS --verbose"
|
||||
daemon /usr/sbin/kojira $ARGS
|
||||
if [ -n "$RUNAS" -a "$RUNAS" != "root" ]; then
|
||||
daemon --user "$RUNAS" /usr/sbin/kojira $ARGS
|
||||
else
|
||||
daemon /usr/sbin/kojira $ARGS
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/kojira
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
FORCE_LOCK=Y
|
||||
KOJIRA_DEBUG=N
|
||||
KOJIRA_VERBOSE=Y
|
||||
RUNAS=root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue