void-packages/srcpkgs/1password/INSTALL

18 lines
726 B
Plaintext

# INSTALL
case "${ACTION}" in
post)
chmod 4755 opt/1Password/chrome-sandbox
chown :_onepassword opt/1Password/1Password-KeyringHelper
chmod u+s opt/1Password/1Password-KeyringHelper
chmod g+s opt/1Password/1Password-KeyringHelper
chown :_onepassword opt/1Password/1Password-BrowserSupport
chmod g+s opt/1Password/1Password-BrowserSupport
export POLICY_OWNERS
POLICY_OWNERS="$(cut -d: -f1,3 etc/passwd | grep -E ':[0-9]{4}$' | cut -d: -f1 | head -n 10 | sed 's/^/unix-user:/' | tr '\n' ' ')"
eval "cat <<EOF
$(cat opt/1Password/com.1password.1Password.policy.tpl)
EOF" > opt/1Password/com.1password.1Password.policy
install -Dm0644 opt/1Password/com.1password.1Password.policy -t usr/share/polkit-1/actions/
;;
esac