aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPitu <[email protected]>2021-01-05 16:39:13 +0900
committerPitu <[email protected]>2021-01-05 16:39:13 +0900
commit4bda02813f9811d37b693729969bb3b1d94416f2 (patch)
treea85e4c50905dedad2bc31f183d0d3528ab7ce803
parentfix: dont save the file to album if no album (diff)
parentMerge pull request #233 from Biyoni/patch-2 (diff)
downloadhost.fuwn.me-4bda02813f9811d37b693729969bb3b1d94416f2.tar.xz
host.fuwn.me-4bda02813f9811d37b693729969bb3b1d94416f2.zip
Merge branch 'master' of github.com:WeebDev/lolisafe
-rw-r--r--chibisafe-sample.service14
-rw-r--r--docs/systemd.md28
2 files changed, 42 insertions, 0 deletions
diff --git a/chibisafe-sample.service b/chibisafe-sample.service
new file mode 100644
index 0000000..f6c1ed3
--- /dev/null
+++ b/chibisafe-sample.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=chibisafe, easy to use file uploader
+After=network.target
+
+[Service]
+Type=simple
+User=yourusername
+WorkingDirectory=/path/to/chibisafe
+EnvironmentFile=/path/to/chibisafe/.env
+ExecStart=/usr/bin/npm run start
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/docs/systemd.md b/docs/systemd.md
new file mode 100644
index 0000000..8804573
--- /dev/null
+++ b/docs/systemd.md
@@ -0,0 +1,28 @@
+### Service config for systemd
+The file chibisafe-example.service is to be moved to `/etc/systemd/system/chibisafe.service`
+
+You will need to edit the parameters:
+- `User` to be the username/uid of your chibisafe instance
+- `WorkingDirectory` to the **FULL** path to your chibisafe, `/home/chibisafe/chibisafe` for example.
+- `EnvironmentFile` the same as the above, with the addition of `/.env`, `/home/chibisafe/chibisafe/.env`
+
+### If you are using n/nvm you will also need to update the path to npm in `ExecStart`
+- For n this will likely be `/home/username/n/bin/npm`
+- You can also find this by running `whereis npm` in your terminal and copy the path from the output.
+
+Example below.
+
+```[Unit]
+Description=chibisafe, easy to use file uploader
+After=network.target
+
+[Service]
+Type=simple
+User=chibisafe
+WorkingDirectory=/home/chibisafe/chibisafe
+EnvironmentFile=/home/chibisafe/chibisafe/.env
+ExecStart=/usr/bin/npm run start
+Restart=always
+
+[Install]
+WantedBy=multi-user.target```