Skip to content

Commit

Permalink
Merge pull request #173 from robbat2/gentoo
Browse files Browse the repository at this point in the history
Actually run as non-root, --user is for matching not chuid.
  • Loading branch information
acidprime committed May 15, 2015
2 parents 752eec0 + 6f42348 commit e9885be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/webhook.init.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ start() {
echo
echo -n $"Starting webhook: "
<% if @osfamily == 'Debian' -%>
start-stop-daemon --start --user ${DAEMON_USER:?} <%= scope.lookupvar('r10k::params::start_pidfile_args') %> --startas=$webhook
start-stop-daemon --start --chuid ${DAEMON_USER} --user ${DAEMON_USER:?} <%= scope.lookupvar('r10k::params::start_pidfile_args') %> --startas=$webhook
<% else -%>
daemon --user ${DAEMON_USER:?} <%= scope.lookupvar('r10k::params::start_pidfile_args') %> $webhook
<% end -%>
Expand Down
1 change: 1 addition & 0 deletions templates/webhook.init.gentoo.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ WEBHOOK_BIN=${WEBHOOK_BIN:=/usr/local/bin/webhook}
command=${WEBHOOK_BIN}
pidfile=${WEBHOOK_PIDFILE}
start_stop_daemon_args="--pidfile ${pidfile} \
--chuid ${WEBHOOK_USER} \
--user ${WEBHOOK_USER} \
--name ${command}"

Expand Down

0 comments on commit e9885be

Please sign in to comment.