[PR #694] Add systemd services (resolves #36, resolves #508) #1675

Open
opened 2026-05-05 07:59:14 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/debauchee/barrier/pull/694
Author: @simons-public
Created: 5/26/2020
Status: 🔄 Open

Base: masterHead: systemd-services


📝 Commits (9)

  • 591f1bf add systemd services
  • e413c46 change paths
  • d697db6 use a single /var/lib/barrier directory
  • 25a3a86 fix typos
  • 6deee4c use absolute paths for for earlier versions of systemd
  • a3ba518 change Type from exec to simple
  • 95ffe58 run mkdir with full privileges
  • 368f0d7 use snap paths if building with snapcraft
  • 35ac344 use StateDirectory instead of mkdir

📊 Changes

4 files changed (+163 additions, -0 deletions)

View changed files

📝 CMakeLists.txt (+9 -0)
dist/systemd/barrierc@.service.in (+59 -0)
dist/systemd/barriers.service.in (+41 -0)
dist/systemd/barriers@.service.in (+54 -0)

📄 Description

This pull request adds 3 systemd services:

barriers.service - Starts the Barrier server with defaults
barriers@.service - Can be used to start a Barrier server instance on another port
barrierc@.service - Used to start Barrier client instance

The server service will create a Barrier.pem self-signed certificate on first run (all other certificate generation in Barrier happens in the GUI). The server instance (with the @) allows starting with a specific listening port with systemctl start barriers@:<port>' or a specific listening IP/port with systemctl start barriers@:`.

The client service will create a 'TrustedServers.txt' with the specified host on first run. It is started as an instance with systemctl start barrierc@<hostname> or enabled with systemctl enable barrierc@<hostname>. The port can also be specified (i.e. barrierc@<hostname>:<port>).

Since these are for using barrier system-wide via systemd, the configuration file specified is /etc/barrier.conf and the data is stored in /var/db/barrier* instead of /root/.local/share/barrier.

They are installed with CMake in /usr/lib/systemd/system so they can be overridden and customized by creating a copy placed in /etc/systemd/system/.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/debauchee/barrier/pull/694 **Author:** [@simons-public](https://github.com/simons-public) **Created:** 5/26/2020 **Status:** 🔄 Open **Base:** `master` ← **Head:** `systemd-services` --- ### 📝 Commits (9) - [`591f1bf`](https://github.com/debauchee/barrier/commit/591f1bf927f8caede04cbec56c57c226b47480b6) add systemd services - [`e413c46`](https://github.com/debauchee/barrier/commit/e413c46d78045aef159ba6289c994573f2603752) change paths - [`d697db6`](https://github.com/debauchee/barrier/commit/d697db67bb454cf3bd41cd3efbf7956429122a92) use a single `/var/lib/barrier` directory - [`25a3a86`](https://github.com/debauchee/barrier/commit/25a3a86ef62044add91291f3fc8c5f0e645d2be1) fix typos - [`6deee4c`](https://github.com/debauchee/barrier/commit/6deee4cef6dafab19fd5bd2da55eb9bd9937bac1) use absolute paths for for earlier versions of systemd - [`a3ba518`](https://github.com/debauchee/barrier/commit/a3ba518176a436076ab811f57eb769c1b4dbb07e) change Type from exec to simple - [`95ffe58`](https://github.com/debauchee/barrier/commit/95ffe5898df8d05695f0e420d4901d6d25806ed8) run mkdir with full privileges - [`368f0d7`](https://github.com/debauchee/barrier/commit/368f0d7f7acd9677356aa57b3e2fd688ab9448c4) use snap paths if building with snapcraft - [`35ac344`](https://github.com/debauchee/barrier/commit/35ac344a36c6379e9f437f792dee7e3071d1215b) use StateDirectory instead of mkdir ### 📊 Changes **4 files changed** (+163 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+9 -0) ➕ `dist/systemd/barrierc@.service.in` (+59 -0) ➕ `dist/systemd/barriers.service.in` (+41 -0) ➕ `dist/systemd/barriers@.service.in` (+54 -0) </details> ### 📄 Description This pull request adds 3 systemd services: `barriers.service` - Starts the Barrier server with defaults `barriers@.service` - Can be used to start a Barrier server instance on another port `barrierc@.service` - Used to start Barrier client instance The server service will create a `Barrier.pem` self-signed certificate on first run (all other certificate generation in Barrier happens in the GUI). The server instance (with the @) allows starting with a specific listening port with `systemctl start barriers@:<port>' or a specific listening IP/port with `systemctl start barriers@<ip>:<port>`. The client service will create a 'TrustedServers.txt' with the specified host on first run. It is started as an instance with `systemctl start barrierc@<hostname>` or enabled with `systemctl enable barrierc@<hostname>`. The port can also be specified (i.e. `barrierc@<hostname>:<port>`). Since these are for using barrier system-wide via systemd, the configuration file specified is `/etc/barrier.conf` and the data is stored in `/var/db/barrier*` instead of `/root/.local/share/barrier`. They are installed with CMake in `/usr/lib/systemd/system` so they can be overridden and customized by creating a copy placed in `/etc/systemd/system/`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror added the
pull-request
label 2026-05-05 07:59:14 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1675
No description provided.