Skip to content

Commit

Permalink
chore(backend-state): move to /usr/local/bin and add .service file (#315
Browse files Browse the repository at this point in the history
)

chore(backend-state): correct path and add .service file
  • Loading branch information
TheButlah authored Dec 10, 2024
1 parent 1aab4d8 commit 9e5a8dc
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 15 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ orb-slot-ctrl.path = "slot-ctrl"
orb-telemetry.path = "telemetry"
orb-update-agent-core.path = "update-agent/core"
orb-zbus-proxies.path = "zbus-proxies"
orb-header-parsing.path = "header-parsing"

[workspace.dependencies.orb-messages]
git = "https://github.com/worldcoin/orb-messages"
Expand Down
15 changes: 11 additions & 4 deletions backend-state/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "orb-backend-state"
version = "0.0.4"
version = "0.0.5"
description = "Systemd service that reads current orb state from orb-manager backend"
authors = ["Ryan Butler <thebutlah@users.noreply.github.com>"]
publish = false
Expand All @@ -19,9 +19,9 @@ clap.workspace = true
color-eyre.workspace = true
derive_more.workspace = true
futures.workspace = true
header-parsing.path = "../header-parsing"
orb-header-parsing.workspace = true
orb-attest-dbus.workspace = true
orb-build-info.path = "../build-info"
orb-build-info.workspace = true
orb-security-utils = { workspace = true, features = ["reqwest"] }
reqwest.workspace = true
tokio.workspace = true
Expand All @@ -30,6 +30,13 @@ tracing.workspace = true
zbus.workspace = true

[build-dependencies]
orb-build-info = { path = "../build-info", features = ["build-script"] }
orb-build-info = { workspace = true, features = ["build-script"] }

[package.metadata.deb]
assets = [
["target/release/orb-backend-state", "/usr/local/bin/", "755"]
]
maintainer-scripts = "debian/"
systemd-units = [
{ unit-name = "worldcoin-backend-state" },
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Worldcoin Backend State
Requires=worldcoin-backend-online.target
After=wordcoin-backend-online.target

[Service]
Type=simple
User=worldcoin
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/worldcoin_bus_socket
Environment=RUST_BACKTRACE=1
SyslogIdentifier=worldcoin-backend-state
ExecStart=/usr/local/bin/orb-backend-state

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion backend-state/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::sync::OnceLock;

use color_eyre::{eyre::WrapErr, Result};
use derive_more::{Display, From};
use header_parsing::time_until_max_age;
use orb_header_parsing::time_until_max_age;

use crate::state::State;

Expand Down
2 changes: 1 addition & 1 deletion header-parsing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "header-parsing"
name = "orb-header-parsing"
version = "0.0.0"
description = "Common header parsing functionality"
authors = ["Ryan Butler <thebutlah@users.noreply.github.com"]
Expand Down

0 comments on commit 9e5a8dc

Please sign in to comment.