From 6bea0a8a6ff4dc8771344f8fd6dbaf77efbc75f5 Mon Sep 17 00:00:00 2001 From: Marco Ferragina Date: Sun, 26 Nov 2023 18:30:02 +0100 Subject: [PATCH] systemd example --- hack/systemd/README.md | 17 +++++++++++++++++ hack/systemd/rospo.service | 20 ++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 hack/systemd/README.md create mode 100644 hack/systemd/rospo.service diff --git a/hack/systemd/README.md b/hack/systemd/README.md new file mode 100644 index 0000000..a08b6a2 --- /dev/null +++ b/hack/systemd/README.md @@ -0,0 +1,17 @@ +# systemd + +Here an example on how to setup rospo for a given +user as a systemd unit + +## prerequisites + +Install homebrew + +```sh +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +Install rospo +```sh +brew install rospo +``` diff --git a/hack/systemd/rospo.service b/hack/systemd/rospo.service new file mode 100644 index 0000000..210691e --- /dev/null +++ b/hack/systemd/rospo.service @@ -0,0 +1,20 @@ +# put this in /etc/systemd/system/rospo.service +# sudo systemctl daemon-reload +# sudo systemctl start rospo + +[Unit] +Description=Rospo +After=network.target auditd.service + +[Service] +WorkingDirectory=/home/ +ExecStart=/home/linuxbrew/.linuxbrew/bin/rospo run /etc/rospo/rospo.yaml +KillMode=process +User= +Group= +Restart=on-failure +Type=simple + +[Install] +WantedBy=multi-user.target +Alias=rospo.service \ No newline at end of file