Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (39 loc) · 1.46 KB
/
Copy pathMakefile
File metadata and controls
53 lines (39 loc) · 1.46 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
.PHONY: build test lint clean config-local service-install service-uninstall service-start service-stop service-restart service-status service-logs service-preflight
build:
go build -o bin/httphop-server ./cmd/server
go build -o bin/httphop-client ./cmd/client
test:
go test -race ./...
lint:
go vet ./...
clean:
rm -rf bin/
# Copy local dev examples into configs/local/ and configs/secrets/ (both gitignored).
config-local:
mkdir -p configs/local configs/secrets
cp configs/examples/local/server.yaml.example configs/local/server.yaml
cp configs/examples/local/client.yaml.example configs/local/client.yaml
@for f in configs/examples/secrets/*.token.example; do \
base=$$(basename "$$f" .example); \
dest="configs/secrets/$$base"; \
if [ ! -f "$$dest" ]; then cp "$$f" "$$dest"; fi; \
done
@echo "configs/local/ + configs/secrets/ ready. Generate secrets, e.g.:"
@echo " openssl rand -hex 32 > configs/secrets/home-gpu-01.token"
# macOS LaunchAgent helpers (auto-start at login, easy start/stop)
service-install:
./scripts/macos/client-service.sh install
service-uninstall:
./scripts/macos/client-service.sh uninstall
service-start:
./scripts/macos/client-service.sh start
service-stop:
./scripts/macos/client-service.sh stop
service-restart:
./scripts/macos/client-service.sh restart
service-status:
./scripts/macos/client-service.sh status
service-logs:
./scripts/macos/client-service.sh logs
service-preflight:
./scripts/macos/client-service.sh preflight