Updated README:
- updated setup instructions Added scripts directory with the systemd config files
This commit is contained in:
parent
10a617aea9
commit
df623f5d75
29
README.md
29
README.md
|
@ -3,14 +3,35 @@
|
||||||
|
|
||||||
## Installation requirements
|
## Installation requirements
|
||||||
|
|
||||||
python3, python3-setuptools
|
|
||||||
`sudo apt install python3-setuptools`
|
* systemd (otherwise the timer have to be changed (crond is not able to operate at 7 second intervals)
|
||||||
libcurl4-openssl-dev libssl-dev
|
* python3, python3-pip
|
||||||
`sudo apt install libcurl4-openssl-dev libssl-dev`
|
`sudo apt install python3-pip`
|
||||||
|
* libcurl4-openssl-dev libssl-dev
|
||||||
|
`sudo apt install libcurl4-openssl-dev libssl-dev`
|
||||||
|
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Get the code with
|
||||||
|
`git clone https://code.ungleich.ch/rouxdo/flashair-uploader.git`
|
||||||
Move the `flashairup` directory to the desired place (e.g. `/home/<USER>/`), referred now as WORKDIR
|
Move the `flashairup` directory to the desired place (e.g. `/home/<USER>/`), referred now as WORKDIR
|
||||||
|
|
||||||
|
Install the required python packages:
|
||||||
|
```
|
||||||
|
#In the WORKDIR
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
### Systemd setup
|
||||||
|
|
||||||
|
Change the WORKDIR the `flashairup.systemd` file and
|
||||||
|
move the altered file with the `flashairup.timer` file to `/etc/systemd/system/`.
|
||||||
|
The files can be found in the `scripts` directory.
|
||||||
|
|
||||||
|
### Configuration and Directory hierarchy
|
||||||
|
|
||||||
|
|
||||||
Create the following directory structure inside the WORKDIR:
|
Create the following directory structure inside the WORKDIR:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Flashair syncronisation program
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=WORKDIR/flashairup/
|
||||||
|
ExecStart=WORKDIR/flashairup/main.py --sync
|
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Start sync every 7 seconds
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=20
|
||||||
|
OnUnitActiveSec=7
|
||||||
|
AccuracySec=1ms
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in New Issue