diff --git a/README.md b/README.md index 3ef6a4587f2573b5c3aee8f1e8c12d9fc0652c9d..d0700f4518758687d7ba8047a8caae72d1cb32e5 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 0000000000000000000000000000000000000000..908b80e3fb2af47bb3b2c37626630e83e6e0e6ba --- /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