From e8c67979f3f6cb2d7fda06bc44c950d87ba3beb2 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Tue, 9 Jun 2020 17:30:00 +0200 Subject: add an example systemd service file --- README.md | 15 +++++++++++++++ ezau.service | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 ezau.service 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 ` 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 -- cgit v1.2.3