Skip to content

Commit

Permalink
feat(1password): allow overriding RELEASE_CHANNEL
Browse files Browse the repository at this point in the history
  • Loading branch information
b- committed Oct 25, 2023
1 parent fe903b9 commit 07d322d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/bling/installers/1password.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

set -ouex pipefail

#### Variables

# Can be "beta" or "stable"
RELEASE_CHANNEL="beta"
RELEASE_CHANNEL="${ONEPASSWORD_RELEASE_CHANNEL:-stable}"

# Must be over 1000
GID_ONEPASSWORD="1500"
GID_ONEPASSWORD="${GID_ONEPASSWORD:-1500}"

# Must be over 1000
GID_ONEPASSWORDCLI="1600"
GID_ONEPASSWORDCLI="${GID_ONEPASSWORDCLI:-1600}"

echo "Installing 1Password"

Expand All @@ -30,7 +30,7 @@ mkdir -p /var/opt # -p just in case it exists
# Setup repo
cat << EOF > /etc/yum.repos.d/1password.repo
[1password]
name=1Password Stable Channel
name=1Password ${RELEASE_CHANNEL^} Channel
baseurl=https://downloads.1password.com/linux/rpm/${RELEASE_CHANNEL}/\$basearch
enabled=1
gpgcheck=1
Expand Down Expand Up @@ -94,7 +94,7 @@ chgrp "${GID_ONEPASSWORD}" "${BROWSER_SUPPORT_PATH}"
chmod g+s "${BROWSER_SUPPORT_PATH}"

# onepassword-cli also needs its own group and setgid, like the other helpers.
chgrp ${GID_ONEPASSWORDCLI} /usr/bin/op
chgrp "${GID_ONEPASSWORDCLI}" /usr/bin/op
chmod g+s /usr/bin/op

# Dynamically create the required groups via sysusers.d
Expand Down

0 comments on commit 07d322d

Please sign in to comment.