YAML-driven ROS2 systemd service manager
Project description
ROS2 Systemd Manager
ROS2 Systemd Manager is a YAML-driven tool to manage ROS2 launch tasks as systemd services.
What It Does
- Bootstrap local files with
ros2-systemd-manager init - Install units with
install - Install + start + enable with
apply - Remove units with
uninstall - Run synchronized update flow with stale-unit cleanup via
update - Regenerate Makefile only with
makefile - Upgrade tool to latest version via
upgrade
Installation
Note: This tool is designed for Linux systems with systemd. Ensure you have Python 3 and pip installed. It is recommended to use sudo for installation to allow systemd unit management.
sudo pip install ros2-systemd-manager
CLI
ros2-systemd-manager [action] [--config PATH] [--workspace-key KEY]
Supported actions:
initinstallapplyuninstallupdatemakefileupgrade
Init Output
Run in an empty directory:
ros2-systemd-manager init
Generated files:
./ros2_services.yaml(default configuration)./ros2-systemd-manager.mk(generated makefile targets fragment)./Makefile(entrypoint that includes the.mkfile)
Note: The tool places generated makefile targets into
ros2-systemd-manager.mkto keep your rootMakefileclean. The rootMakefilewill automatically include the.mkfragment.
YAML Keys
Required:
systemdruntimeworkspaces
Optional:
actions(default action isapply)makefile
Generated Makefile
Primary targets:
make upgrade # self-upgrade ros2-systemd-manager via pip
make install # install unit files only
make apply # install + start + enable
make start # systemctl start all configured units
make stop # systemctl stop all configured units
make restart # systemctl restart all configured units
make status # systemctl status all configured units
make status-long # systemctl status with 100 log lines
make enable # systemctl enable all configured units
make disable # systemctl disable all configured units
make logs # follow logs for all configured units
make logs-recent # show last 200 log lines for all configured units
make <op>-<service> # op in start/stop/restart/status/enable/disable/logs
make <op>-<service>-<sfx> # e.g., logs-<svc>-recent, status-<svc>-long (100 lines)
make uninstall # uninstall all configured units
make update # stop old + uninstall + install/start/enable + refresh mk
make makefile # refresh generated mk only (no systemd changes)
Config behavior:
- No hardcoded absolute config path.
- Default auto-discovery strictly looks for
./ros2_services.yamlin the current running directory. - Override manually via
CONFIGenvironment variable or--configparameter:
make apply CONFIG=./my_services.yaml
File Tracking & Safety
- Automatic Backups: Whenever files in
/etc/systemd/system/are modified (viaupdate,install, oruninstall), a copy of the exact deployed file along with its MD5 hash (and a global hash) is stored in~/.config/ros2-systemd-manager/previous-update/. - Modification Detection: During
updateoruninstalloperations, the manager usesfilecmpanddiffto check if you have manually modified the systemd service file. If modifications are detected, it presents a diff in the terminal and asks if you want to archive your manual changes to~/.config/ros2-systemd-manager/archive/before proceeding with the overwrite/deletion.
Safety
- Use trusted launch commands only.
- Validate workspace paths and setup scripts before
applyorupdate. - Prefer
installfirst for new services.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ros2_systemd_manager-0.1.3.tar.gz.
File metadata
- Download URL: ros2_systemd_manager-0.1.3.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd8fe479cf6461dd3d4b5b503ca2fe3380d473382f1fc94d7c67e9a2721c5e9c
|
|
| MD5 |
ed08be57f3792d46407ff71c559cdf29
|
|
| BLAKE2b-256 |
a4dcf2d7ffd4fee7a55d2cad6f40745bcfa991e79bce032b67050094ae9ad36d
|
Provenance
The following attestation bundles were made for ros2_systemd_manager-0.1.3.tar.gz:
Publisher:
release-pypi.yml on hnrobert/ros2-systemd-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_systemd_manager-0.1.3.tar.gz -
Subject digest:
fd8fe479cf6461dd3d4b5b503ca2fe3380d473382f1fc94d7c67e9a2721c5e9c - Sigstore transparency entry: 1248090925
- Sigstore integration time:
-
Permalink:
hnrobert/ros2-systemd-manager@e90b8248d3da788d73be4182e367685d37dbeeca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hnrobert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@e90b8248d3da788d73be4182e367685d37dbeeca -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ros2_systemd_manager-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ros2_systemd_manager-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9885bdeeb883e170713ac042bdd70b8e2105601645002835f560b2ea5fc92f7c
|
|
| MD5 |
eff4fbcc22a746c15cfb0dba72bda2ec
|
|
| BLAKE2b-256 |
2b259d3e8d487d8d8d3fbd25f14aad30bf7ab917f64cd912f34b808833e40f7e
|
Provenance
The following attestation bundles were made for ros2_systemd_manager-0.1.3-py3-none-any.whl:
Publisher:
release-pypi.yml on hnrobert/ros2-systemd-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_systemd_manager-0.1.3-py3-none-any.whl -
Subject digest:
9885bdeeb883e170713ac042bdd70b8e2105601645002835f560b2ea5fc92f7c - Sigstore transparency entry: 1248091059
- Sigstore integration time:
-
Permalink:
hnrobert/ros2-systemd-manager@e90b8248d3da788d73be4182e367685d37dbeeca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hnrobert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@e90b8248d3da788d73be4182e367685d37dbeeca -
Trigger Event:
workflow_dispatch
-
Statement type: