added service for block fetching

This commit is contained in:
Enju Aihara 2022-03-04 19:25:29 +01:00
parent bde8234a90
commit 4bcd85ef86
2 changed files with 16 additions and 1 deletions

View file

@ -26,7 +26,12 @@ systemctl start mastodon_api
Fill the database with blocks.
`python fetch_blocks.py`
Make sure to edit the `User` and `WorkingDirectory` of the service file accordingly.
```
sudo cp services/fetch_blocks.service /etc/systemd/system
systemctl start fetch_blocks
```
## License

View file

@ -0,0 +1,10 @@
[Unit]
Description=Fetch blocks
[Service]
Type=simple
Restart=always
RestartSec=1
User=
WorkingDirectory=/fedi-block-api
ExecStart=python fetch_blocks.py