blob: ee919f0d152546f2011b89c0fc56eae6ae2d554b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[Unit]
Description=Bitwarden CLI login
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
LoadCredentialEncrypted=bw-client-id
LoadCredentialEncrypted=bw-client-secret
ExecStart=-/usr/bin/notify-send 'Logging in to BitWarden with client secret'
ExecStart=/usr/bin/bash -c 'env BW_CLIENTID="$(systemd-creds cat bw-client-id)" BW_CLIENTSECRET="$(systemd-creds cat bw-client-secret)" bw login --apikey'
ExecStop=/usr/bin/bw logout
[Install]
WantedBy=default.target
|