Files
Maksim Totmin 4c34f0bedc Initial commit: Go driver for the Lian Li Galahad II LCD
Streams H.264 to the Galahad II LCD via USB (gousb) with:
- ffmpeg CLI transcoding (no fragile FFmpeg C-ABI bindings)
- pure-Go Annex-B access-unit splitting
- framerate pacing with graceful shutdown and USB reconnect
- TOML config, cobra CLI, structured slog logging, unit tests
2026-08-19 12:03:54 +07:00

31 lines
747 B
Bash
Executable File

#!/usr/bin/env bash
#
# Remove galahad2lcd: stop the service and delete all installed files.
#
# Usage: sudo ./uninstall.sh
set -euo pipefail
APP=galahad2lcd
BINDIR=/usr/local/bin
SYSTEMD_DIR=/etc/systemd/system
UDEV_DIR=/etc/udev/rules.d
CONFIG_FILE=/etc/galahad2lcd.toml
info() { echo -e "\033[0;32m[+] $*\033[0m"; }
fail() { echo -e "\033[0;31m[-] $*\033[0m" >&2; exit 1; }
[[ $EUID -eq 0 ]] || fail "run as root (sudo $0)"
info "stopping and disabling ${APP}"
systemctl disable --now "${APP}" 2>/dev/null || true
rm -f "${BINDIR}/${APP}"
rm -f "${SYSTEMD_DIR}/${APP}.service"
rm -f "${UDEV_DIR}/99-${APP}.rules"
rm -f "${CONFIG_FILE}"
systemctl daemon-reload
udevadm control --reload-rules 2>/dev/null || true
info "uninstall complete"