We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4c4c34 commit c0cf531Copy full SHA for c0cf531
pkg/logstash.sysv
@@ -54,11 +54,16 @@ start() {
54
# Boy, I hope we're root here.
55
SGROUPS=$(grep "$LS_USER" /etc/group | grep -v "^$LS_GROUP" | cut -d: -f1 | tr "\\n" "," | sed 's/,$//'; echo '')
56
57
+ if [ ! -z $SGROUPS ]
58
+ then
59
+ EXTRA_GROUPS="--groups $SGROUPS"
60
+ fi
61
+
62
# set ulimit as (root, presumably) first, before we drop privileges
63
ulimit -n ${LS_OPEN_FILES}
64
65
# Run the program!
- nice -n ${LS_NICE} chroot --userspec $LS_USER:$LS_GROUP --groups $SGROUPS / sh -c "
66
+ nice -n ${LS_NICE} chroot --userspec $LS_USER:$LS_GROUP $EXTRA_GROUPS / sh -c "
67
cd $LS_HOME
68
69
exec \"$program\" $args
0 commit comments