diff options
author | Paul Robertson | 2021-03-08 15:14:41 -0500 |
---|---|---|
committer | Paul Robertson | 2021-03-08 15:15:29 -0500 |
commit | 3c501f4591377e38af66e889d666e72ef28fb999 (patch) | |
tree | c07a4423c489720b6704829132e9f7c0644790a5 | |
parent | 5acb9572cc5a18bdfe211eec379f3aee0d282a63 (diff) | |
download | aur-3c501f4591377e38af66e889d666e72ef28fb999.tar.gz |
added upgrade hooks to support users who already have the app installed
-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 } |