diff options
Diffstat (limited to '1password.install')
-rwxr-xr-x[-rw-r--r--] | 1password.install | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/1password.install b/1password.install index 43e7894772af..446df885dd76 100644..100755 --- a/1password.install +++ b/1password.install @@ -10,8 +10,16 @@ app_group_exists() { } pre_install() { - if app_group_exists; then - // Do nothing + if app_group_exists; then + : # Do nothing + else + groupadd "${GROUP_NAME}" + fi +} + +pre_upgrade() { + if app_group_exists; then + : # Do nothing else groupadd "${GROUP_NAME}" fi @@ -27,8 +35,18 @@ post_install() { chmod g+s $HELPER_PATH } +post_upgrade() { + # Setup the Core App Integration helper binary with the correct permissions and group + HELPER_PATH="/opt/1password/1Password-KeyringHelper" + + chgrp "${GROUP_NAME}" $HELPER_PATH + # The binary requires setuid so it may interact with the Kernel keyring facilities + chmod u+s $HELPER_PATH + chmod g+s $HELPER_PATH +} + post_remove() { - if app_group_exists; then + if app_group_exists; then groupdel "${GROUP_NAME}" fi } |