Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions AWSMarketplace/marketplace-image.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ build {
destination = "/tmp/001_onboot"
}

provisioner "file" {
source = "../CommonMarketplace/files/etc/profile.d/bitwarden-first-login.sh"
destination = "/tmp/bitwarden-first-login.sh"
}

# Move staged files to their final system locations
provisioner "shell" {
inline = [
Expand All @@ -136,9 +131,8 @@ build {
"sudo mv /tmp/install-standard.sh /opt/bitwarden/install-standard.sh",
"sudo mv /tmp/install-lite.sh /opt/bitwarden/install-lite.sh",
"sudo mv /tmp/001_onboot /var/lib/cloud/scripts/per-instance/001_onboot",
"sudo mv /tmp/bitwarden-first-login.sh /etc/profile.d/bitwarden-first-login.sh",
"sudo chown root:root /etc/update-motd.d/99-bitwarden-welcome /etc/ufw/applications.d/bitwarden /opt/bitwarden/setup-wizard.sh /opt/bitwarden/install-standard.sh /opt/bitwarden/install-lite.sh /var/lib/cloud/scripts/per-instance/001_onboot /etc/profile.d/bitwarden-first-login.sh",
"sudo chmod 644 /etc/ufw/applications.d/bitwarden /etc/profile.d/bitwarden-first-login.sh"
"sudo chown root:root /etc/update-motd.d/99-bitwarden-welcome /etc/ufw/applications.d/bitwarden /opt/bitwarden/setup-wizard.sh /opt/bitwarden/install-standard.sh /opt/bitwarden/install-lite.sh /var/lib/cloud/scripts/per-instance/001_onboot",
"sudo chmod 644 /etc/ufw/applications.d/bitwarden"
]
}

Expand Down
10 changes: 2 additions & 8 deletions AzureMarketplace/marketplace-image.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ build {
destination = "/tmp/001_onboot"
}

provisioner "file" {
source = "../CommonMarketplace/files/etc/profile.d/bitwarden-first-login.sh"
destination = "/tmp/bitwarden-first-login.sh"
}

provisioner "file" {
source = "../CommonMarketplace/files/etc/systemd/system/disable-swap.service"
destination = "/tmp/disable-swap.service"
Expand All @@ -161,10 +156,9 @@ build {
"sudo mv /tmp/install-standard.sh /opt/bitwarden/install-standard.sh",
"sudo mv /tmp/install-lite.sh /opt/bitwarden/install-lite.sh",
"sudo mv /tmp/001_onboot /var/lib/cloud/scripts/per-instance/001_onboot",
"sudo mv /tmp/bitwarden-first-login.sh /etc/profile.d/bitwarden-first-login.sh",
"sudo mv /tmp/disable-swap.service /etc/systemd/system/disable-swap.service",
"sudo chown root:root /etc/update-motd.d/99-bitwarden-welcome /etc/ufw/applications.d/bitwarden /opt/bitwarden/setup-wizard.sh /opt/bitwarden/install-standard.sh /opt/bitwarden/install-lite.sh /var/lib/cloud/scripts/per-instance/001_onboot /etc/profile.d/bitwarden-first-login.sh /etc/systemd/system/disable-swap.service",
"sudo chmod 644 /etc/ufw/applications.d/bitwarden /etc/profile.d/bitwarden-first-login.sh /etc/systemd/system/disable-swap.service",
"sudo chown root:root /etc/update-motd.d/99-bitwarden-welcome /etc/ufw/applications.d/bitwarden /opt/bitwarden/setup-wizard.sh /opt/bitwarden/install-standard.sh /opt/bitwarden/install-lite.sh /var/lib/cloud/scripts/per-instance/001_onboot /etc/systemd/system/disable-swap.service",
"sudo chmod 644 /etc/ufw/applications.d/bitwarden /etc/systemd/system/disable-swap.service",
"sudo systemctl enable disable-swap.service"
]
}
Expand Down
16 changes: 0 additions & 16 deletions CommonMarketplace/files/etc/profile.d/bitwarden-first-login.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ else
Welcome to your Bitwarden server
https://bitwarden.com

Setup has not been completed. Please log in to complete the Bitwarden
edition selection and installation wizard.
Setup has not been completed. To choose your deployment edition
(Standard or Lite) and install, run:

sudo bitwarden-setup

********************************************************************************
EOF
Expand Down
3 changes: 0 additions & 3 deletions CommonMarketplace/files/opt/bitwarden/setup-wizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,3 @@ if [ "$EDITION" = "standard" ]; then
else
/opt/bitwarden/install-lite.sh
fi

# Remove the first-login trigger so this wizard doesn't run again
rm -f /etc/profile.d/bitwarden-first-login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
# created from your image. Things like generating passwords, configuration requiring IP address
# or other items that will be unique to each instance should be done in scripts here.

# The Bitwarden edition selection and installation wizard runs on the first interactive login.
# See /etc/profile.d/bitwarden-first-login.sh
# The Bitwarden edition selection and installation wizard is run on demand by
# the user via `sudo bitwarden-setup` (advertised in the message of the day).
# See /opt/bitwarden/setup-wizard.sh
6 changes: 6 additions & 0 deletions CommonMarketplace/scripts/01-setup-first-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ chmod +x /etc/update-motd.d/99-bitwarden-welcome
chmod +x /opt/bitwarden/setup-wizard.sh
chmod +x /opt/bitwarden/install-standard.sh
chmod +x /opt/bitwarden/install-lite.sh

#
# Expose the setup wizard as `bitwarden-setup` (advertised by the MOTD)
#

ln -sf /opt/bitwarden/setup-wizard.sh /usr/local/bin/bitwarden-setup
1 change: 0 additions & 1 deletion DigitalOceanMarketplace/marketplace-image.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ build {
"chmod +x /opt/bitwarden/setup-wizard.sh",
"chmod +x /opt/bitwarden/install-standard.sh",
"chmod +x /opt/bitwarden/install-lite.sh",
"chmod 644 /etc/profile.d/bitwarden-first-login.sh",
"chmod 644 /etc/ufw/applications.d/bitwarden"
]
}
Expand Down
Loading