modified for venv
This commit is contained in:
parent
e0e6133e12
commit
ea122ddb2b
2 changed files with 10 additions and 7 deletions
13
README.md
13
README.md
|
@ -9,14 +9,17 @@ Requirements /w install links: [Grafana](http://docs.grafana.org/installation/),
|
||||||
<center><img width="800" src="https://i.imgur.com/av8e0HP.png"></center>
|
<center><img width="800" src="https://i.imgur.com/av8e0HP.png"></center>
|
||||||
|
|
||||||
## Quick Setup (Varken Alpha)
|
## Quick Setup (Varken Alpha)
|
||||||
1. Clone the repository `git clone https://github.com/DirtyCajunRice/grafana-scripts.git /opt/Varken`
|
1. Clone the repository `sudo git clone https://github.com/DirtyCajunRice/grafana-scripts.git /opt/Varken`
|
||||||
|
2. Change ownership to current user `sudo chown $USER -R /opt/Varken/`
|
||||||
1. Switch to the testing branch `cd /opt/Varken && git checkout refactor-project`
|
1. Switch to the testing branch `cd /opt/Varken && git checkout refactor-project`
|
||||||
1. Install requirements `/usr/bin/python -m pip install -r requirements.txt`
|
1. Create venv in project `/usr/bin/python3 -m venv varken-venv`
|
||||||
|
1. Install requirements `/opt/Varken/varken-venv/bin/python -m pip install -r requirements.txt`
|
||||||
2. Make a copy of `varken.example.ini` to `varken.ini` in the `data` folder
|
2. Make a copy of `varken.example.ini` to `varken.ini` in the `data` folder
|
||||||
`cp data/varken.example.ini data/varken.ini`
|
`cp /opt/Varken/data/varken.example.ini /opt/Varken/data/varken.ini`
|
||||||
3. Make the appropriate changes to `varken.ini`
|
3. Make the appropriate changes to `varken.ini`
|
||||||
`nano data/varken.ini`
|
`nano /opt/Varken/data/varken.ini`
|
||||||
4. Copy the systemd file `cp varken.service /etc/systemd/system/`
|
4. Copy the systemd file `sudo cp /opt/Varken/varken.service /etc/systemd/system/`
|
||||||
|
1. Edit the username of the systemd file `sudo sed -i "s/username/$USER" /etc/systemd/system/varken.service`
|
||||||
5. start the service and enable it `systemctl start varken && systemctl enable varken`
|
5. start the service and enable it `systemctl start varken && systemctl enable varken`
|
||||||
5. After completing the [getting started](http://docs.grafana.org/guides/getting_started/) portion of grafana, create your datasource for influxdb. At a minimum, you will need the plex database.
|
5. After completing the [getting started](http://docs.grafana.org/guides/getting_started/) portion of grafana, create your datasource for influxdb. At a minimum, you will need the plex database.
|
||||||
6. Install `grafana-cli plugins install grafana-worldmap-panel`
|
6. Install `grafana-cli plugins install grafana-worldmap-panel`
|
||||||
|
|
|
@ -4,9 +4,9 @@ After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=username
|
||||||
WorkingDirectory=/opt/Varken
|
WorkingDirectory=/opt/Varken
|
||||||
ExecStart=/usr/bin/python3 /opt/Varken/varken.py
|
ExecStart=/opt/Varken/varken-venv/bin/python /opt/Varken/varken.py
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Reference in a new issue