From 13eb0dc010d36af491465b13d06e3d99921cde68 Mon Sep 17 00:00:00 2001 From: "Michael J. Smalley" Date: Mon, 14 Dec 2015 14:25:30 -0500 Subject: [PATCH] README: Provided explicitness in installation docs The installation docs described the what but not the how. Fixed. Also updated to accurately reflect required permissions. --- README.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 917bf8f..1bb62b4 100644 --- a/README.rst +++ b/README.rst @@ -38,11 +38,23 @@ Installation Instructions * See ``pip`` installation instructions at http://www.pip-installer.org/en/latest/installing.html -2. Copy the configuration file example from ``/opt/newrelic-plugin-agent/newrelic-plugin-agent.cfg`` to ``/etc/newrelic/newrelic-plugin-agent.cfg`` and edit the configuration in that file. +2. Copy the configuration file example from ``/opt/newrelic-plugin-agent/newrelic-plugin-agent.cfg`` to ``/etc/newrelic/newrelic-plugin-agent.cfg`` and edit the configuration in that file: -3. Make a ``/var/log/newrelic`` directory and make sure it is writable by the user specified in the configuration file +:: + + $ NRCFGFILE=/etc/newrelic/newrelic-plugin-agent.cfg; if [[ ! -f "$NRCFGFILE" ]] ; then cp /opt/newrelic-plugin-agent/newrelic-plugin-agent.cfg $NRCFGFILE; fi + +3. Make a ``/var/log/newrelic`` directory and make sure it is writable by the ``root`` user: + +:: + + $ NRLOGDIR=/var/log/newrelic; if [ ! -d "$NRLOGDIR" ]; then mkdir $NRLOGDIR && chown -R root:root $NRLOGDIR && chmod -R 755 $NRLOGDIR; fi + +4. Make a ``/var/run/newrelic`` directory and make sure it is writable by the ``newrelic`` user: + +:: -4. Make a ``/var/run/newrelic`` directory and make sure it is writable by the user specified in the configuration file + $ NRRUNDIR=/var/run/newrelic; if [ ! -d "$NRRUNDIR" ]; then mkdir $NRRUNDIR && chown -R newrelic:newrelic $NRRUNDIR && chmod -R 755 $NRRUNDIR; fi 5. Run the app: