jakeswenson / BitBetter

Modify bit warden to provide my own licensing for self hosting
510 stars 115 forks source link

where should i put the copy keys line in script #102

Closed robina80 closed 3 years ago

robina80 commented 3 years ago

hi all,

heres my script i made

!/bin/bash

sed -i -e 's%bitbetter/api%bitwarden/api:latest%g' /bitwarden/bwdata/docker/docker-compose.yml sed -i -e 's%bitbetter/identity%bitwarden/identity:latest%g' /bitwarden/bwdata/docker/docker-compose.yml

cd /bitwarden/bwdata/docker/ docker-compose pull && docker-compose up -d

rm -f /bitwarden/bwdata/master.zip rm -rf /bitwarden/bwdata/BitBetter-master

cd /bitwarden/bwdata/ wget https://github.com/jakeswenson/BitBetter/archive/refs/heads/master.zip unzip master.zip

/bitwarden/bwdata/BitBetter-master/build.sh /bitwarden/bwdata/BitBetter-master/src/licenseGen/build.sh cp -f /bitwarden/backup/certs/* /bitwarden/bwdata/BitBetter-master/.keys/

sed -i -e 's%bitwarden/api:latest%bitbetter/api%g' /bitwarden/bwdata/docker/docker-compose.yml sed -i -e 's%bitwarden/identity:latest%bitbetter/identity%g' /bitwarden/bwdata/docker/docker-compose.yml

cd /bitwarden/bwdata/docker/ docker-compose up -d

question is do i put the

cp -f /bitwarden/backup/certs/* /bitwarden/bwdata/BitBetter-master/.keys/

before or after the "build.sh" commands?

thanks, rob

h44z commented 3 years ago

you need to have the keys available before building bitbetter (they will be used in the compiled binary), so you have to execute the cp command before the build.sh commands

robina80 commented 3 years ago

thanks @h44z