-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (53 loc) · 3.13 KB
/
Makefile
File metadata and controls
63 lines (53 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: help dev dev-web dev-restart build install-units uninstall-units install-configs show-config-dir
help:
@echo "Development:"
@echo " dev - Start Tauri desktop app + backend (full development)"
@echo " dev-web - Start backend only (browser at http://localhost:8000)"
@echo " dev-restart - Kill ALL dev processes and restart fresh"
@echo " build - Build Tauri production app"
@echo ""
@echo "Installation:"
@echo " install-units - Copy systemd units to /etc/systemd/system and enable"
@echo " uninstall-units - Disable and remove systemd units"
@echo " install-configs - Create /etc/halbert and copy example configs if missing"
@echo " show-config-dir - Print resolved config_dir from Halbert"
# ─────────────────────────────────────────────────────────────────────────────
# Development (Tauri + FastAPI)
# ─────────────────────────────────────────────────────────────────────────────
dev:
@./scripts/dev-dashboard.sh
dev-web:
@./scripts/dev-dashboard-web.sh
dev-restart:
@./scripts/dev-restart.sh
build:
@echo "Building Halbert Tauri app..."
cd halbert_core/halbert_core/dashboard/frontend && npm run build && npm run tauri build
install-units:
@echo "Installing Halbert systemd units (requires sudo)"
sudo cp packaging/systemd/system/*.service /etc/systemd/system/
sudo cp packaging/systemd/system/*.path /etc/systemd/system/ || true
sudo systemctl daemon-reload
sudo systemctl enable --now halbert-ingest-journald.service
sudo systemctl enable --now halbert-ingest-hwmon.service
sudo systemctl enable --now halbert-config-watch.service
sudo systemctl enable --now halbert-config-watch.path || true
@echo ""
@echo "Dashboard service available but not auto-started:"
@echo " sudo systemctl enable --now halbert-dashboard@$(USER).service"
uninstall-units:
@echo "Uninstalling Halbert systemd units (requires sudo)"
sudo systemctl disable --now halbert-config-watch.path || true
sudo systemctl disable --now halbert-config-watch.service || true
sudo systemctl disable --now halbert-ingest-hwmon.service || true
sudo systemctl disable --now halbert-ingest-journald.service || true
sudo rm -f /etc/systemd/system/halbert-*.service /etc/systemd/system/halbert-*.path
sudo systemctl daemon-reload
install-configs:
@echo "Installing example configs to /etc/halbert (requires sudo); existing files preserved"
sudo mkdir -p /etc/halbert
@if [ ! -f /etc/halbert/ingestion.yml ]; then sudo cp config/ingestion.yml /etc/halbert/; fi
@if [ ! -f /etc/halbert/config-registry.yml ]; then sudo cp config/config-registry.yml /etc/halbert/; fi
@if [ ! -f /etc/halbert/policy.yml ]; then sudo cp config/policy.yml /etc/halbert/; fi
show-config-dir:
@python3 -c 'import os,sys; sys.path.insert(0,"halbert_core"); from halbert_core.halbert_core.utils.paths import config_dir; print(config_dir())'