systemd: Small improvements to unit files

This commit is contained in:
cloudhead 2024-01-24 10:48:11 +01:00
parent 47799cbab2
commit d722638905
No known key found for this signature in database
2 changed files with 12 additions and 17 deletions

View File

@ -3,10 +3,7 @@
# When running radicle-httpd on a server, it should be run as a separate user. # When running radicle-httpd on a server, it should be run as a separate user.
# #
# Copy this file into /etc/systemd/system and set the User/Group parameters # Copy this file into /etc/systemd/system and set the User/Group parameters
# under [Service] appropriately. # under [Service] appropriately, or copy it into the user's systemd directory.
#
# For users wishing to run a configured version of the service, copy this
# service file into the user's systemd directory, and edit appropriately.
# #
# For example: # For example:
# #
@ -18,8 +15,8 @@ After=syslog.target network.target
Description=Radicle HTTPd Description=Radicle HTTPd
[Service] [Service]
ExecStart=%h/.radicle/bin/radicle-httpd ExecStart=%h/.radicle/bin/radicle-httpd --listen 127.0.0.1:8080
Environment=RAD_HOME=%h/.radicle Environment=RAD_HOME=%h/.radicle RUST_BACKTRACE=1 RUST_LOG=info
KillMode=process KillMode=process
Restart=always Restart=always
RestartSec=1 RestartSec=1

View File

@ -3,34 +3,32 @@
# When running radicle-node on a server, it should be run as a separate user. # When running radicle-node on a server, it should be run as a separate user.
# #
# Copy this file into /etc/systemd/system and set the User/Group parameters # Copy this file into /etc/systemd/system and set the User/Group parameters
# under [Service] appropriately. # under [Service] appropriately, or copy it into the user's systemd directory.
#
# For users wishing to run a configured version of the service, copy this
# service file into the user's systemd directory, and edit appropriately.
# #
# For example: # For example:
# #
# mkdir -p $HOME/.config/systemd/user/ # mkdir -p $HOME/.config/systemd/user/
# cp radicle-node.service $HOME/.config/systemd/user/radicle-node.service # cp radicle-node.service $HOME/.config/systemd/user/radicle-node.service
# #
# You will have to set the RAD_PASSPHRASE environment variable to the # If your Radicle key is passphrase-protected, you will have to set the
# passphrase supplied during `rad auth`, for the node to start, eg. # RAD_PASSPHRASE environment variable to the passphrase supplied during
# `rad auth`, eg.
# #
# [Service] # [Service]
# Environment=RAD_PASSPHRASE=<passphrase> # Environment=RAD_PASSPHRASE=snickerdoodle
# #
# Also ensure RAD_HOME is set appropriately. # Also ensure RAD_HOME is set appropriately.
# #
[Unit] [Unit]
After=syslog.target network.target
Description=Radicle Node Description=Radicle Node
After=syslog.target network.target
[Service] [Service]
ExecStart=%h/.radicle/bin/radicle-node --listen 0.0.0.0:8776 ExecStart=%h/.radicle/bin/radicle-node --listen 0.0.0.0:8776 --force
Environment=RAD_HOME=%h/.radicle Environment=RAD_HOME=%h/.radicle RUST_BACKTRACE=1 RUST_LOG=info
KillMode=process KillMode=process
Restart=always Restart=always
RestartSec=1 RestartSec=3
[Install] [Install]
WantedBy=default.target WantedBy=default.target