Browse Source

Updated README:

- updated setup instructions

Added scripts directory with the systemd config files
master
Dominique Roux 2 years ago
parent
commit
df623f5d75
  1. 29
      README.md
  2. 6
      scripts/flashairup.service
  3. 8
      scripts/flashairup.timer

29
README.md

@ -3,14 +3,35 @@
## Installation requirements
python3, python3-setuptools
`sudo apt install python3-setuptools`
libcurl4-openssl-dev libssl-dev
`sudo apt install libcurl4-openssl-dev libssl-dev`
* systemd (otherwise the timer have to be changed (crond is not able to operate at 7 second intervals)
* python3, python3-pip
`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
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:
```

6
scripts/flashairup.service

@ -0,0 +1,6 @@
[Unit]
Description=Flashair syncronisation program
[Service]
WorkingDirectory=WORKDIR/flashairup/
ExecStart=WORKDIR/flashairup/main.py --sync

8
scripts/flashairup.timer

@ -0,0 +1,8 @@
[Unit]
Description=Start sync every 7 seconds
[Timer]
OnBootSec=20
OnUnitActiveSec=7
AccuracySec=1ms
[Install]
WantedBy=timers.target
Loading…
Cancel
Save