From 94aee8174d291a7f1265834c8e515a64451841eb Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 26 Nov 2021 15:13:41 +0100 Subject: [PATCH] usage.md: add section `Managing services` --- docs/usage.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/usage.md b/docs/usage.md index 5d290a5..08ba40b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -9,6 +9,31 @@ update-nix-bitcoin # Nodeinfo Run `nodeinfo` to see onion addresses and local addresses for enabled services. +# Managing services + +NixOS uses the [systemd](https://wiki.archlinux.org/title/systemd) service manager. + +Usage: +```shell +# Show service status +systemctl status bitcoind + +# Show the last 100 log messages +journalctl -u bitcoind -n 100 +# Show all log messages since the last system boot +journalctl -b -u bitcoind + +# These commands require root permissions +systemctl stop bitcoind +systemctl start bitcoind +systemctl restart bitcoind + +# Show the service definition +systemctl cat bitcoind +# Show all service parameters +systemctl show bitcoind +``` + # Connect to RTL Normally you would connect to RTL via SSH tunneling with a command like this