aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-06-09 17:30:00 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-06-09 17:30:00 +0200
commite8c67979f3f6cb2d7fda06bc44c950d87ba3beb2 (patch)
treee8d8293e2522e684bc8d0ddd894324d054624b4e
parent626438b282d4ef9d4719104cba552f915e681cac (diff)
downloadezau-e8c67979f3f6cb2d7fda06bc44c950d87ba3beb2.tar.gz
ezau-e8c67979f3f6cb2d7fda06bc44c950d87ba3beb2.tar.bz2
ezau-e8c67979f3f6cb2d7fda06bc44c950d87ba3beb2.zip
add an example systemd service file
-rw-r--r--README.md15
-rw-r--r--ezau.service11
2 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7d6d1cc..08dff28 100644
--- a/README.md
+++ b/README.md
@@ -73,6 +73,21 @@ Note that this bypasses the `upload`/`upload_unknown` settings.
See `ezau help` and `ezau help <subcommand>` for more information.
+systemd
+-------
+
+An exemplary systemd unit file is provided in `ezau.service`.
+You can use it to let an `ezau` instange be managed by systemd, which provides features such as persistent logging through `journalctl` and automatic restarts after a crash.
+To install `ezau` as a user unit, do the following:
+
+* Edit the paths in `ezau.service` according to your system.
+* Install `ezau` as a user unit by copying `ezau.service` to `~/.config/systemd/user/`.
+* Reload systemd: `systemctl --user daemon-reload`.
+* Start `ezau` manually: `systemctl --user start ezau`.
+* *alternatively* Let `ezau` start whenever you log in: `systemctl --user enable ezau`.
+
+For more information about systemd user instances, consult your [systemd manual of trust](https://wiki.archlinux.org/index.php/Systemd/User).
+
License
-------
diff --git a/ezau.service b/ezau.service
new file mode 100644
index 0000000..373caa0
--- /dev/null
+++ b/ezau.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=EVTC Zipper and Uploader
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/ezau -c /etc/ezau.toml watch PATH_TO_ARCDPS.CBTLOGS_DIRECTORY
+Restart=on-failure
+Environment=RUST_LOG=info
+
+[Install]
+WantedBy=default.target