From 52ab08c289e66d960ebf96ef28ffa13c1e677b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Schulthess?= Date: Wed, 25 Oct 2023 13:31:37 +0200 Subject: [PATCH 1/3] add user systemd service --- docs/source/using.rst | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/source/using.rst b/docs/source/using.rst index ef8a4c5..68120be 100644 --- a/docs/source/using.rst +++ b/docs/source/using.rst @@ -827,3 +827,43 @@ If you want to automatically start ``rnsd`` at boot, run: .. code:: text sudo systemctl enable rnsd + +Alternatively you can use a user systemd service instead of a system wide one. This way the whole setup can be done as a regular user. +Create a user systemd service files ``~/.config/systemd/user/rnsd.service`` with the following content: + +.. code:: text + + [Unit] + Description=Reticulum Network Stack Daemon + After=default.target + + [Service] + # If you run Reticulum on WiFi devices, + # or other devices that need some extra + # time to initialise, you might want to + # add a short delay before Reticulum is + # started by systemd: + # ExecStartPre=/bin/sleep 10 + Type=simple + Restart=always + RestartSec=3 + ExecStart=RNS_BIN_DIR/rnsd --service + + [Install] + WantedBy=default.target + + Replace ``RNS_BIN_DIR`` with the path to your Reticulum binary directory (eg. /home/USERNAMEHERE/rns/bin). + + Start user service: + + .. code:: text + systemctl --user daemon-reload + systemctl --user start rnsd.service + + If you want to automatically start ``rnsd`` without having to log in as the USERNAMEHERE, do: + + .. code:: text + sudo loginctl enable-linger USERNAMEHERE + systemctl --user enable rnsd.service + + From 276b6fbd2234962f097d1525daefc6116534d89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Schulthess?= Date: Wed, 25 Oct 2023 14:07:34 +0200 Subject: [PATCH 2/3] fix indentation --- docs/source/using.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/source/using.rst b/docs/source/using.rst index 68120be..7fa148d 100644 --- a/docs/source/using.rst +++ b/docs/source/using.rst @@ -852,18 +852,18 @@ Create a user systemd service files ``~/.config/systemd/user/rnsd.service`` with [Install] WantedBy=default.target - Replace ``RNS_BIN_DIR`` with the path to your Reticulum binary directory (eg. /home/USERNAMEHERE/rns/bin). +Replace ``RNS_BIN_DIR`` with the path to your Reticulum binary directory (eg. /home/USERNAMEHERE/rns/bin). - Start user service: +Start user service: - .. code:: text - systemctl --user daemon-reload - systemctl --user start rnsd.service +.. code:: text + systemctl --user daemon-reload + systemctl --user start rnsd.service - If you want to automatically start ``rnsd`` without having to log in as the USERNAMEHERE, do: +If you want to automatically start ``rnsd`` without having to log in as the USERNAMEHERE, do: - .. code:: text - sudo loginctl enable-linger USERNAMEHERE - systemctl --user enable rnsd.service +.. code:: text + sudo loginctl enable-linger USERNAMEHERE + systemctl --user enable rnsd.service From a4e8489a34ab19d18f5a78610a2c9a5b4dd0c53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Schulthess?= Date: Wed, 25 Oct 2023 14:09:24 +0200 Subject: [PATCH 3/3] fix code text syntax --- docs/source/using.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/using.rst b/docs/source/using.rst index 7fa148d..e375f91 100644 --- a/docs/source/using.rst +++ b/docs/source/using.rst @@ -857,12 +857,14 @@ Replace ``RNS_BIN_DIR`` with the path to your Reticulum binary directory (eg. /h Start user service: .. code:: text + systemctl --user daemon-reload systemctl --user start rnsd.service If you want to automatically start ``rnsd`` without having to log in as the USERNAMEHERE, do: .. code:: text + sudo loginctl enable-linger USERNAMEHERE systemctl --user enable rnsd.service