Skip to content

Commit

Permalink
feat: systemd unit for zia-client in deb package
Browse files Browse the repository at this point in the history
  • Loading branch information
Conni2461 committed Oct 23, 2024
1 parent e21cd04 commit c7c2459
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zia-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ anyhow = { version = "1.0", default-features = false }
hyper-util = { version = "0.1", features = ["tokio"] }
hyper = { version = "1.4", default-features = false }

[package.metadata.deb]
maintainer-scripts = "debian/"
systemd-units = { enable = false }
assets = [
["target/release/zia-client", "/usr/bin/zia-client", "755"],
["debian/default", "/etc/zia-client", "644"]
]

[package.metadata.generate-rpm]
assets = [
{ source = "../LICENSE", dest = "/usr/share/doc/zia-client/LICENSE", doc = true, mode = "0644" },
Expand Down
8 changes: 8 additions & 0 deletions zia-client/debian/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# public websocket listener (client -> ZIA_UPSTREAM)
ZIA_LISTEN_ADDR=127.0.0.1:8090

# your actual udp service e.g. wireguard listener
#ZIA_UPSTREAM=wss://domain.tld/ws

ZIA_COUNT=4
ZIA_WS_MASKING=true
12 changes: 12 additions & 0 deletions zia-client/debian/service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Proxy udp over websocket, zia client
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/zia-client
EnvironmentFile=/etc/zia-client

[Install]
WantedBy=multi-user.target

0 comments on commit c7c2459

Please sign in to comment.