- Sudo privilege
- Current dir is the root of this project, i.e., btcnode-metrics.
Follow these steps to initialize the host before the first time running the service.
-
Make the helper scripts executable
chmod +x ./linux/*.sh -
Use the
create-user_btcnode_metrics.shscript to:- Create a user & a group named btcnode_metrics for the service.
- Create a config dir in btcnode_metrics home dir for the btcnode-metrics config file.
sudo cp ./linux/create-user_btcnode_metrics.sh -
Copy service file
sudo cp ./linux/etc/systemd/system/btcnode-metrics.service /etc/systemd/system/ -
Set the service to start on boot
sudo systemctl enable btcnode-metrics
Follow these instructions for updating the btcnode-metrics application or its config file.
-
Install the latest version
cargo install btcnode-metrics --force -
Copy the app to the shared location
sudo cp $HOME/.cargo/bin/btcnode-metrics /usr/local/bin
sudo cp ./config.local.toml /home/btcnode_metrics/.config/btcnode-metrics/
sudo chown btcnode_metrics:btcnode_metrics /home/btcnode_metrics/.config/btcnode-metrics/config.local.toml