pub fn install_systemd(binary: &str, group: &str) -> Result<()>Expand description
Installs the natmap daemon as a systemd service.
Performs the following steps:
- Copies the current binary to
binary(unless already at that path). - Creates the
groupsystem group if it does not exist. - Adds the current user to the group (requires re-login to take effect).
- Writes a systemd service unit to
/etc/systemd/system/natmap.service. - Runs
systemctl daemon-reload, thensystemctl enable --now natmap.