BlueGit

timfa bluegit

Files

bluegit / packaging / install.sh

install.sh

feat: self-update via een root-unit achter een token
timfa project_87923614_bot_3aff574f6f98414b945a8799374f9092 · pushed by timfa · 3 weeks ago
ad7bf26a History
install.sh 1.5 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 -Dm755 packaging/bluegit-update.sh /usr/lib/bluegit/update
14install -Dm644 packaging/bluegit-update.service /usr/lib/systemd/system/bluegit-update.service
15install -Dm644 packaging/bluegit-update.rules /usr/share/polkit-1/rules.d/49-bluegit-update.rules
16install -Dm644 packaging/storage.conf /usr/share/bluegit/storage.conf.example
17if [ ! -f /etc/bluegit/config.yml ]; then
18 install -Dm640 packaging/bluegit.yml /etc/bluegit/config.yml
19fi
20systemd-sysusers bluegit.conf || true
21systemd-tmpfiles --create bluegit.conf || true
22systemctl daemon-reload
23echo "Klaar. Vul /etc/bluegit/client_secret."
24echo "De database komt in /var/lib/bluegit. Kies de datadisk zelf: kopieer /usr/share/bluegit/storage.conf.example naar /etc/systemd/system/bluegit.service.d/storage.conf en zet ReadWritePaths op die map."
25echo "Daarna: systemctl daemon-reload && systemctl enable --now bluegit"
26echo "De eerste aanmelding kiest hetzelfde pad in het setup-scherm. Git en CI doen niets tot dat gebeurd is."