mirror of
https://github.com/morgan9e/bitwarden-desktop-agent
synced 2026-04-15 00:34:11 +09:00
add systemd and launchd unit files, suppress unused warnings
This commit is contained in:
12
docs/bw-agent.service
Normal file
12
docs/bw-agent.service
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Bitwarden Desktop Agent
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=%h/.local/bin/bw-agent --email %I
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
20
docs/com.bitwarden.agent.plist
Normal file
20
docs/com.bitwarden.agent.plist
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>com.bitwarden.agent</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>/Users/USER/.local/bin/bw-agent</string>
|
||||||
|
<string>--email</string>
|
||||||
|
<string>USER@EXAMPLE.COM</string>
|
||||||
|
</array>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
<key>KeepAlive</key>
|
||||||
|
<true/>
|
||||||
|
<key>StandardErrorPath</key>
|
||||||
|
<string>/tmp/bw-agent.log</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -113,6 +113,7 @@ pub fn get_prompter(name: Option<&str>) -> Prompter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn available() -> Vec<&'static str> {
|
pub fn available() -> Vec<&'static str> {
|
||||||
let mut found = vec!["cli"];
|
let mut found = vec!["cli"];
|
||||||
if cfg!(target_os = "macos") {
|
if cfg!(target_os = "macos") {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ pub mod pin;
|
|||||||
|
|
||||||
pub trait KeyStore {
|
pub trait KeyStore {
|
||||||
fn name(&self) -> &str;
|
fn name(&self) -> &str;
|
||||||
|
#[allow(dead_code)]
|
||||||
fn is_available(&self) -> bool;
|
fn is_available(&self) -> bool;
|
||||||
fn has_key(&self, uid: &str) -> bool;
|
fn has_key(&self, uid: &str) -> bool;
|
||||||
fn store(&self, uid: &str, data: &[u8], auth: &str) -> Result<(), String>;
|
fn store(&self, uid: &str, data: &[u8], auth: &str) -> Result<(), String>;
|
||||||
|
|||||||
Reference in New Issue
Block a user