From 354a037c70db439dfb965ffee72ca13b8eaaee8b Mon Sep 17 00:00:00 2001 From: dansheps Date: Mon, 29 Apr 2019 11:01:20 -0500 Subject: [PATCH] Fix path and documentation --- contrib/gunicorn.conf | 2 +- contrib/netbox.env | 6 +++--- docs/installation/3-http-daemon.md | 14 +++++++------- docs/installation/migrating-to-systemd.md | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/gunicorn.conf b/contrib/gunicorn.conf index 929a8b9d9..9ecf81008 100644 --- a/contrib/gunicorn.conf +++ b/contrib/gunicorn.conf @@ -19,4 +19,4 @@ timeout=120 # ErrorLog # ErrorLog is the logfile for the ErrorLog # -errorlog='/usr/local/netbox/netbox.log' \ No newline at end of file +errorlog='/opt/netbox/netbox.log' \ No newline at end of file diff --git a/contrib/netbox.env b/contrib/netbox.env index c42e31a73..c64cc587a 100644 --- a/contrib/netbox.env +++ b/contrib/netbox.env @@ -4,12 +4,12 @@ Name = 'Netbox' # ConfigPath is the path to the gunicorn config file. # -ConfigPath=/usr/local/netbox/gunicorn.conf +ConfigPath=/opt/netbox/gunicorn.conf # WorkingDirectory is the Working Directory for Netbox. # -WorkingDirectory=/usr/local/netbox/ +WorkingDirectory=/opt/netbox/ # PidPath is the path to the pid for the netbox WSGI # -PidPath=/usr/local/netbox/netbox.pid \ No newline at end of file +PidPath=/opt/netbox/netbox.pid \ No newline at end of file diff --git a/docs/installation/3-http-daemon.md b/docs/installation/3-http-daemon.md index d9b3859c6..209afee0c 100644 --- a/docs/installation/3-http-daemon.md +++ b/docs/installation/3-http-daemon.md @@ -113,11 +113,11 @@ Install gunicorn: Copy or link contrib/netbox.service and contrib/netbox-rq.service to /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service ```no-highlight -# cp -f contrib/netbox.service to /etc/systemd/system/netbox.service -# cp -f contrib/netbox-rq.service to /etc/systemd/system/netbox-rq.service +# cp contrib/netbox.service to /etc/systemd/system/netbox.service +# cp contrib/netbox-rq.service to /etc/systemd/system/netbox-rq.service ``` -Edit /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service Be sure to verify the location of the gunicorn executable on your server (e.g. `which gunicorn`). If using CentOS/RHEL. Change the username from `www-data` to `nginx` or `apache`: +Edit /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service. Be sure to verify the location of the gunicorn executable on your server (e.g. `which gunicorn`). If using CentOS/RHEL, change the username from `www-data` to `nginx` or `apache`: ```no-highlight /usr/local/bin/gunicorn --pid ${PidPath} --pythonpath ${WorkingDirectory}/netbox --config ${ConfigPath} netbox.wsgi @@ -131,7 +131,7 @@ Group=www-data Copy contrib/netbox.env to /etc/sysconfig/netbox.env ```no-highlight -# cp -f contrib/netbox.env to /etc/sysconfig/netbox.env +# cp contrib/netbox.env to /etc/sysconfig/netbox.env ``` Edit /etc/sysconfig/netbox.env and change the settings as required. Update the `WorkingDirectory` variable if needed. @@ -143,11 +143,11 @@ Name = 'Netbox' # ConfigPath is the path to the gunicorn config file. # -ConfigPath=/usr/local/netbox/gunicorn.conf +ConfigPath=/opt/netbox/gunicorn.conf # WorkingDirectory is the Working Directory for Netbox. # -WorkingDirectory=/usr/local/netbox/ +WorkingDirectory=/opt/netbox/ # PidPath is the path to the pid for the netbox WSGI # @@ -185,7 +185,7 @@ timeout=120 # ErrorLog # ErrorLog is the logfile for the ErrorLog # -errorlog='/usr/local/netbox/netbox.log' +errorlog='/opt/netbox/netbox.log' ``` Then, restart the systemd daemon service to detect the netbox service and start the netbox service: diff --git a/docs/installation/migrating-to-systemd.md b/docs/installation/migrating-to-systemd.md index 5c5020cee..8f207c6ad 100644 --- a/docs/installation/migrating-to-systemd.md +++ b/docs/installation/migrating-to-systemd.md @@ -15,8 +15,8 @@ Migration is not required, as supervisord will still continue to function. Copy or link contrib/netbox.service and contrib/netbox-rq.service to /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service ```no-highlight -# cp -f contrib/netbox.service to /etc/systemd/system/netbox.service -# cp -f contrib/netbox-rq.service to /etc/systemd/system/netbox-rq.service +# cp contrib/netbox.service /etc/systemd/system/netbox.service +# cp contrib/netbox-rq.service /etc/systemd/system/netbox-rq.service ``` Edit /etc/systemd/system/netbox.service and /etc/systemd/system/netbox-rq.service. Be sure to verify the location of the gunicorn executable on your server (e.g. `which gunicorn`). If using CentOS/RHEL. Change the username from `www-data` to `nginx` or `apache`: @@ -33,7 +33,7 @@ Group=www-data Copy contrib/netbox.env to /etc/sysconfig/netbox.env ```no-highlight -# cp -f contrib/netbox.env to /etc/sysconfig/netbox.env +# cp contrib/netbox.env /etc/sysconfig/netbox.env ``` Edit /etc/sysconfig/netbox.env and change the settings as required. Update the `WorkingDirectory` variable if needed. @@ -45,11 +45,11 @@ Name = 'Netbox' # ConfigPath is the path to the gunicorn config file. # -ConfigPath=/usr/local/netbox/gunicorn.conf +ConfigPath=/opt/netbox/gunicorn.conf # WorkingDirectory is the Working Directory for Netbox. # -WorkingDirectory=/usr/local/netbox/ +WorkingDirectory=/opt/netbox/ # PidPath is the path to the pid for the netbox WSGI # @@ -86,7 +86,7 @@ timeout=120 # ErrorLog # ErrorLog is the logfile for the ErrorLog # -errorlog='/usr/local/netbox/netbox.log' +errorlog='/opt/netbox/netbox.log' ``` Then, restart the systemd daemon service to detect the netbox service and start the netbox service: