Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(linux GUI): install script #4873

Closed
1 task
ReactorScram opened this issue May 1, 2024 · 3 comments · Fixed by #4879
Closed
1 task

doc(linux GUI): install script #4873

ReactorScram opened this issue May 1, 2024 · 3 comments · Fixed by #4879
Assignees
Labels
area/tauri_client The Windows and Linux Tauri GUI clients
Milestone

Comments

@ReactorScram
Copy link
Collaborator

ReactorScram commented May 1, 2024

Before merging

We could get rid of this* if we use a post-install script in the deb package. But Tauri's deb bundler doesn't support that, so we'd need to switch to cargo-deb. I'd really like to do that and use build.rs or something instead of build.bat and build.sh, but it's a big time sink.

*The adduser step probably should be manual, but systemctl and groupadd can be done in a post-install script.

#!/usr/bin/env bash
# Usage: bash firezone-setup.bash firezone-client-gui_VERSION_ARCH.deb
# This script should be idempotent
set -euox pipefail

echo "Adding your user to the firezone group..."
sudo groupadd --force firezone
sudo adduser "$USER" firezone

echo "Installing Firezone..."
sudo apt install "$1"

echo "Starting and enabling Firezone IPC service..."
sudo systemctl enable --now firezone-client-ipc

# Unfortunately Ubuntu seems to need a reboot here, at least 20.04 does
echo "Reboot to finish adding yourself to the group"
@ReactorScram ReactorScram self-assigned this May 1, 2024
@ReactorScram ReactorScram added the area/tauri_client The Windows and Linux Tauri GUI clients label May 1, 2024
@ReactorScram ReactorScram changed the title doc: install script doc(linux GUI): install script May 1, 2024
@ReactorScram ReactorScram added this to the 05/24 milestone May 1, 2024
@thomaseizinger
Copy link
Member

Users can be added declaratively too if we already have systemd as a prerequisite.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html

@jamilbk
Copy link
Member

jamilbk commented May 2, 2024

@ReactorScram
Copy link
Collaborator Author

@jamilbk Hm, so that creates both a user and group "firezone". I only need the group, but maybe I should use "firezone-client" instead.

btw if you set User and Group in systemd you could probably drop that entire sudo command:

User=root
Group=firezone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tauri_client The Windows and Linux Tauri GUI clients
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants