Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Varnish plugin can only be run from the plugin directory #6

@jamrok

Description

@jamrok

Hey,

I was writing an init script for this plugin and realised that I can't run the plugin from the absolute path.

I would have to change to the directory that had the plugin and run it from the current directory.

The fix that I came up with was to edit the [ /var/lib/gems/1.8/gems/newrelic_plugin-1.0.3/lib/newrelic_plugin/config.rb ] file and change:
@config_file||="config/newrelic_plugin.yml"
TO:
@config_file||=(File.expand_path File.dirname($0))+"/config/newrelic_plugin.yml"

This allowed running from the absolute path since it will always be able to find the [ /config/newrelic_plugin.yml ] file.

I'm filing this issue here since [ https://github.com/newrelic-platform/newrelic_plugin ] doesn't allow us to, and I figured that you guys can get it pushed.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions