greizgh / vaultwarden-debian

vaultwarden_rs packaging tool
GNU General Public License v3.0
55 stars 16 forks source link

Systemd unit for sqlite built #31

Closed xylle closed 3 years ago

xylle commented 3 years ago

Hello,

I have build sqlite package, but in systemd unit, i have some reference to mysql that prevents starting.

Masgalor commented 3 years ago

Would you like to share some additional info with us?

What command did you use to build the binary? What version did you build? What is the actual content of your service-file?

xylle commented 3 years ago

Sorry, I use the latest version : git pull before build First, I make the mysql version build.sh -d mysql, after i make the sqlite version build.sh -d sqlite

Package : bitwarden_rs-buster-1.20.0-sqlite-amd64.deb

I modified the systemd unit and I do not remember the version before modification. /etc/systemd/system/multi-user.target.wants/bitwarden_rs.service

[Unit]
Description=Bitwarden API server
After=network.target

[Service]
Type=simple
User=bitwarden
ExecStart=/usr/local/bin/bitwarden_rs
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=strict
WorkingDirectory=/etc/bitwarden_rs
ReadWriteDirectories=/var/lib/bitwarden_rs
EnvironmentFile=/etc/bitwarden_rs/config.env

[Install]
WantedBy=multi-user.target
greizgh commented 3 years ago

The issue comes from the building script which alter the service template in place. For now a workaround is to git clean between your two builds.

xylle commented 3 years ago

ok, thanks