-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init.d script -- fix issue #3803 #3804
init.d script -- fix issue #3803 #3804
Conversation
@@ -45,7 +45,7 @@ PIDFILE=/var/run/influxdb/influxd.pid | |||
PIDDIR=`dirname $PIDFILE` | |||
if [ ! -d "$PIDDIR" ]; then | |||
mkdir -p $PIDDIR | |||
chown $GROUP:$USER $PIDDIR | |||
chown $USER:$GROUP $PIDDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to @dgnorton in PR 3115 I realise there was a bug here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this specific change.
Well, init scripts aren't my forte, but this all seems to make sense to me. What do you think, @otoolep? |
@@ -62,6 +62,7 @@ fi | |||
|
|||
if [ ! -f "$STDOUT" ]; then | |||
mkdir -p $(dirname $STDOUT) | |||
chown $USER:$GROUP $(dirname $STDOUT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely not. If STDOUT
(and STDERR
) are not changed from the defaults, this is changing the owner and group of /dev
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. it makes no sense to do this, right?
chown influxdb:influxdb /dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opps, that's true, I was trying to fix the corner case when you change from the default user influxdb to another user and the file/directory already exist.
I will revert this change.
2 of the changes make sense. The other 2 scare me! |
Please let me know if I am missing something here. |
Thanks @KoeSystems -- can you squash the 3 changes into 1? |
Closed in error. |
Thanks @KoeSystems -- merging now. |
init.d script -- fix issue #3803
This bug was introduced in PR 3115.