]> git.mxchange.org Git - fba.git/commitdiff
added service for the mastodon API
authorEnju Aihara <5-EnjuAihara@users.noreply.gitlab.varis.social>
Fri, 4 Mar 2022 17:45:23 +0000 (18:45 +0100)
committerEnju Aihara <5-EnjuAihara@users.noreply.gitlab.varis.social>
Fri, 4 Mar 2022 17:45:23 +0000 (18:45 +0100)
README.md
services/mastodon_api.service [new file with mode: 0644]

index e90aa5b390b51114fc984ff9c6df98f5bbee3d99..3ef6a4587f2573b5c3aee8f1e8c12d9fc0652c9d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -15,10 +15,13 @@ Copy the preloaded database to the live database
 
 Start the mastodon API
 
+Make sure to edit the `User` and `WorkingDirectory` of the service file accordingly.
+
 ```
+sudo cp services/mastodon_api.service /etc/systemd/system
 cd mastodon_api
 yarn install
-node .
+systemctl start mastodon_api
 ```
 
 Fill the database with blocks.
diff --git a/services/mastodon_api.service b/services/mastodon_api.service
new file mode 100644 (file)
index 0000000..9e4e748
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Mastodon API
+
+[Service]
+Type=simple
+Restart=always
+RestartSec=1
+User=
+WorkingDirectory=/fedi-block-api/mastodon_api
+ExecStart=node .
\ No newline at end of file