Files
firezone/scripts/firezone-client-gui-install.sh
Jamil 6ae494904e docs: Update 'user guides' -> 'client apps' (#5940)
- This terminology / naming makes things more clear for most
admins/users.
- Fixes layout of /kb/client-apps to align better

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-07-23 14:04:07 +00:00

27 lines
981 B
Bash
Executable File

#!/usr/bin/env bash
# Keep this synchronized with the Linux GUI docs in `/website/src/app/kb/client-apps/linux-gui-client`
# Usage: ./firezone-client-gui-install.sh ./firezone-client-gui_VERSION_ARCH.deb
#
# The `./` is necessary
#
# This script should be idempotent, so it can be used for upgrades, too.
set -euox pipefail
# `apt-get` needs either a leading `./` or `/` to recognize a local file path
DEB_PATH=$(realpath "$1")
GROUP_NAME="firezone-client"
echo "Installing Firezone..."
sudo apt-get install --yes "$DEB_PATH"
echo "Adding your user to the $GROUP_NAME group..."
sudo usermod -aG "$GROUP_NAME" "$USER"
# Check if the user is already in the group
if ! groups | grep "$GROUP_NAME" &>/dev/null; then
# Unfortunately Ubuntu seems to need a reboot here, at least 20.04 does
echo "You MUST reboot to finish adding yourself to the group. Firezone won't function correctly until this is done."
else
echo "Finished installing / upgrading Firezone Client."
fi