diff --git a/README.md b/README.md index 3ef6a45..d0700f4 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/services/fetch_blocks.service b/services/fetch_blocks.service new file mode 100644 index 0000000..908b80e --- /dev/null +++ b/services/fetch_blocks.service @@ -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 \ No newline at end of file