mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-03-22 07:41:51 +00:00
Closes #4987 ```[tasklist] ### Before merging - [x] Get an x64 test VM on the Windows laptop and test a CI-built deb ```
26 lines
880 B
Bash
Executable File
26 lines
880 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 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 -a -G "$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
|