Skip to content

Commit

Permalink
Fix debian package postinst for password and vault (#4195)
Browse files Browse the repository at this point in the history
  • Loading branch information
sblaisot authored Oct 25, 2023
2 parents 71255c8 + 44613ce commit fdac27a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debian/cozy-stack.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ configure)

if [ ! -f /etc/cozy/cozy-admin-passphrase ]; then
db_get cozy-stack/cozy/password && COZY_PASS="${RET}"
COZY_ADMIN_PASSPHRASE="${COZY_PASS}" cozy-stack config passwd /etc/cozy/cozy-admin-passphrase
COZY_ADMIN_PASSPHRASE="${COZY_PASS}" cozy-stack -c /dev/null config passwd /etc/cozy/cozy-admin-passphrase
printf "%s" "${COZY_PASS}" > /etc/cozy/.cozy-admin-passphrase
chmod u=rw,og= /etc/cozy/.cozy-admin-passphrase
fi
Expand Down Expand Up @@ -84,7 +84,7 @@ configure)
fi

if [ ! -f /etc/cozy/vault.enc ] || [ ! -f /etc/cozy/vault.dec ]; then
cozy-stack config gen-keys /etc/cozy/vault
cozy-stack -c /dev/null config gen-keys /etc/cozy/vault
chown cozy-stack: /etc/cozy/vault.enc /etc/cozy/vault.dec
chmod u=rw,og= /etc/cozy/vault.enc /etc/cozy/vault.dec
fi
Expand Down

0 comments on commit fdac27a

Please sign in to comment.