Skip to content

Commit

Permalink
Merge pull request #8 from spencerwooo/systemd-deb
Browse files Browse the repository at this point in the history
Systemd unit files support on Debian / Ubuntu
  • Loading branch information
spencerwooo authored Dec 4, 2023
2 parents 10d89ae + 4a35ee1 commit 5ad4a30
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bitsrun"
description = "A headless login and logout CLI for 10.0.0.55 at BIT"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
license = "MIT"
homepage = "https://github.com/spencerwooo/bitsrun-rs"
Expand Down Expand Up @@ -43,3 +43,5 @@ strip = "symbols"

[package.metadata.deb]
copyright = "2023 Spencer Woo"
maintainer-scripts = "debian/"
systemd-units = { enable = true, start = false }
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

- `curl -fsSL https://cdn.jsdelivr.net/gh/spencerwooo/bitsrun-rs@main/install.sh | sh -`

#### Ubuntu / Debian
#### Ubuntu / Debian (recommended for `systemd` support)

- Download the latest `.deb` package from [Releases](https://github.com/spencerwooo/bitsrun-rs/releases/latest).
- `sudo dpkg -i <file>.deb`
- `sudo apt install ./<path/to/file>.deb`
- Start `bitsrun.service` if desired: edit `/lib/systemd/system/bitsrun.service` to specify absolute config path, then `sudo systemctl start bitsrun`

#### Cargo

Expand Down
11 changes: 11 additions & 0 deletions debian/bitsrun.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=bitsrun - A headless login and logout CLI for 10.0.0.55 at BIT
After=network.target

[Service]
Type=simple
Restart=on-abort
ExecStart=/usr/bin/bitsrun keep-alive --config /path/to/bit-user.json

[Install]
WantedBy=multi-user.target

0 comments on commit 5ad4a30

Please sign in to comment.