-
Notifications
You must be signed in to change notification settings - Fork 5
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
list index our of range #3
Comments
Thanks for the patch. What does your DAEMON_OPTS line look like in /etc/init.d/varnish? |
but a few lines before there is this:
in that file (
however I get the same error if I do |
The line breaks you have are confusing the script. It expects the DAEMON_OPTS line to be a continuous one. So I need a fix for this and a clean one hopefully. There's also the fact that you're running on two storage types at the same time. That will also need to be worked around. |
Getting the following: with a varnish config file contents of: |
Looks like in my situation had to change mem_str = i.split(',')[2].strip('"') to mem_str = i.split(',')[4].strip('"') because of where I put the memory option in my options string. Perhaps in the future it would be better to just detect the "-s" memory flag and find it from there. |
Note also that even if one goes though the trouble of putting all of DAEMON_OPTS onto one line, the script will still fail of there is a comment line containing #DAEMON_OPTS. It will also fail if some other parameter, like "-w 50,1000,120", contains commas. There are reasons why people use prewritten libraries to parse things like config files. It avoids exactly this sort of problem. Other people have already figured out all of the possible cases that can trip you up. |
once I apply #2 I don't get past this error:
The text was updated successfully, but these errors were encountered: