BlueGit

timfa bluegit

Files

bluegit / packaging / install.sh

install.sh

feat: eerste basis van BlueGit
timfa project_87923614_bot_3aff574f6f98414b945a8799374f9092 · pushed by timfa · 3 weeks ago
151aa352 History
install.sh 1.1 KiB Download Raw
1#!/bin/sh
2# Installeert BlueGit op Arch zonder makepkg.
3# Gebruik: sudo packaging/install.sh
4set -eu
5root=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
6cd "$root"
7export CGO_ENABLED=0
8go build -trimpath -ldflags='-s -w' -o bluegit ./cmd/bluegit
9install -Dm755 bluegit /usr/bin/bluegit
10install -Dm644 packaging/bluegit.service /usr/lib/systemd/system/bluegit.service
11install -Dm644 packaging/sysusers.conf /usr/lib/sysusers.d/bluegit.conf
12install -Dm644 packaging/tmpfiles.conf /usr/lib/tmpfiles.d/bluegit.conf
13install -Dm644 packaging/storage.conf /usr/share/bluegit/storage.conf.example
14if [ ! -f /etc/bluegit/config.yml ]; then
15 install -Dm640 packaging/bluegit.yml /etc/bluegit/config.yml
16fi
17systemd-sysusers bluegit.conf || true
18systemd-tmpfiles --create bluegit.conf || true
19systemctl daemon-reload
20echo "Klaar. Vul /etc/bluegit/client_secret."
21echo "Maak de map op de 4 TB-schijf, en kopieer /usr/share/bluegit/storage.conf.example naar /etc/systemd/system/bluegit.service.d/storage.conf (pas het pad aan)."
22echo "Daarna: systemctl daemon-reload && systemctl enable --now bluegit"