Initial commit: freeze-watcher daemon, GUI, systemd unit, PKGBUILD
This commit is contained in:
commit
d41f861802
10 changed files with 655 additions and 0 deletions
39
Makefile
Normal file
39
Makefile
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
PREFIX ?= /usr/local
|
||||
BINDIR := $(PREFIX)/bin
|
||||
APPDIR := $(PREFIX)/share/applications
|
||||
SYSTEMDDIR := /etc/systemd/system
|
||||
LOGDIR := /var/log/freeze-watcher
|
||||
LOG_GROUP ?= $(shell id -gn)
|
||||
|
||||
.PHONY: install uninstall enable disable status logs clean
|
||||
|
||||
install:
|
||||
install -Dm755 src/freeze-watcher.sh $(DESTDIR)$(BINDIR)/freeze-watcher.sh
|
||||
install -Dm755 src/freeze-monitor-gui $(DESTDIR)$(BINDIR)/freeze-monitor-gui
|
||||
install -Dm644 systemd/freeze-watcher.service $(DESTDIR)$(SYSTEMDDIR)/freeze-watcher.service
|
||||
install -Dm644 desktop/freeze-monitor.desktop $(DESTDIR)$(APPDIR)/freeze-monitor.desktop
|
||||
install -dm775 -g $(LOG_GROUP) $(DESTDIR)$(LOGDIR)
|
||||
@echo "Installed. Run 'make enable' to start the service."
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(BINDIR)/freeze-watcher.sh
|
||||
rm -f $(DESTDIR)$(BINDIR)/freeze-monitor-gui
|
||||
rm -f $(DESTDIR)$(SYSTEMDDIR)/freeze-watcher.service
|
||||
rm -f $(DESTDIR)$(APPDIR)/freeze-monitor.desktop
|
||||
@echo "Uninstalled. Logs at $(LOGDIR) preserved."
|
||||
|
||||
enable:
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now freeze-watcher.service
|
||||
|
||||
disable:
|
||||
systemctl disable --now freeze-watcher.service
|
||||
|
||||
status:
|
||||
systemctl status freeze-watcher.service --no-pager
|
||||
|
||||
logs:
|
||||
journalctl -u freeze-watcher.service -f
|
||||
|
||||
clean:
|
||||
@echo "Nothing to clean (no build artifacts)."
|
||||
Loading…
Add table
Add a link
Reference in a new issue