Add systemd --user service for the watch daemon
breadcrumbs had a watch subcommand meant to run continuously but no systemd unit anywhere, so bakery installs never actually started it - Wi-Fi profile config in bos-settings had no daemon consuming it.
This commit is contained in:
parent
3b6e37ecfe
commit
2418cb900c
5 changed files with 32 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ jobs:
|
||||||
> "${PKG_DIR}/breadcrumbs-x86_64.sha256"
|
> "${PKG_DIR}/breadcrumbs-x86_64.sha256"
|
||||||
cp src/breadcrumbs.example.toml "${PKG_DIR}/"
|
cp src/breadcrumbs.example.toml "${PKG_DIR}/"
|
||||||
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
|
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
|
||||||
|
cp src/contrib/breadcrumbs.service "${PKG_DIR}/"
|
||||||
ln -sfn "${VERSION}" "/srv/breadway-dl/breadcrumbs/latest"
|
ln -sfn "${VERSION}" "/srv/breadway-dl/breadcrumbs/latest"
|
||||||
|
|
||||||
- name: regenerate index.json
|
- name: regenerate index.json
|
||||||
|
|
|
||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -54,7 +54,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "breadcrumbs"
|
name = "breadcrumbs"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "breadcrumbs"
|
name = "breadcrumbs"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Profile-aware Wi-Fi state machine with Tailscale handling and self-healing watch daemon"
|
description = "Profile-aware Wi-Fi state machine with Tailscale handling and self-healing watch daemon"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,11 @@ bread_deps = []
|
||||||
dir = "~/.config/breadcrumbs"
|
dir = "~/.config/breadcrumbs"
|
||||||
example = "breadcrumbs.example.toml"
|
example = "breadcrumbs.example.toml"
|
||||||
|
|
||||||
|
[[service]]
|
||||||
|
unit = "breadcrumbs.service"
|
||||||
|
enable = true
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
post_install = []
|
post_install = [
|
||||||
|
"systemctl --user is-active --quiet breadcrumbs || systemctl --user start breadcrumbs",
|
||||||
|
]
|
||||||
|
|
|
||||||
22
contrib/breadcrumbs.service
Normal file
22
contrib/breadcrumbs.service
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
[Unit]
|
||||||
|
Description=breadcrumbs Wi-Fi state machine watcher
|
||||||
|
Documentation=https://git.breadway.dev/Breadway/breadcrumbs
|
||||||
|
After=network.target NetworkManager.service graphical-session.target
|
||||||
|
Wants=network.target graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
# ExecStart is rewritten at install time by bakery to point at the real
|
||||||
|
# bin_dir (patch_exec_start in bakery's install.rs) — this path is only a
|
||||||
|
# placeholder for local testing.
|
||||||
|
ExecStart=%h/.local/bin/breadcrumbs watch
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
Nice=5
|
||||||
|
|
||||||
|
# Forward stdout/stderr to the journal so `journalctl --user -u breadcrumbs` works
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
||||||
Loading…
Add table
Add a link
Reference in a new issue