From 89ddbdb9c72d02af78e167669d576f0a5742cbd3 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 7 Feb 2024 11:55:44 +0200 Subject: radicle-other-node: start node as a service using systemd Signed-off-by: Lars Wirzenius Sponsored-by: author --- ansible/radicle-other-node.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ansible/radicle-other-node.yml b/ansible/radicle-other-node.yml index 3904a22..5f24b25 100644 --- a/ansible/radicle-other-node.yml +++ b/ansible/radicle-other-node.yml @@ -46,6 +46,34 @@ curl -sSf https://radicle.xyz/install > radicle-install sudo -u _rad bash radicle-install + - name: "install systemd unit for Radicle node" + copy: + content: | + [Unit] + After=syslog.target network.target + Description=Radicle Node + + [Service] + Type=simple + ExecStart=/home/_rad/.radicle/bin/radicle-node --listen 0.0.0.0:8776 + Environment=RAD_HOME=/home/_rad/.radicle + KillMode=process + Restart=never + RestartSec=1 + User=_rad + Group=_rad + + [Install] + WantedBy=default.target + dest: /lib/systemd/system/radicle-node.service + + - name: "enable systemd unit for Radicle node" + systemd: + name: radicle-node + state: restarted + masked: no + enabled: yes + daemon_reload: yes vars: sane_debian_system_version: 2 sane_debian_system_hostname: "{{ inventory_hostname }}" -- cgit v1.2.1