summarylogtreecommitdiffstats
path: root/hapi-git.install
blob: 6fcce019e1e1fd88837c7981f748bd5b018589d0 (plain)
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
pre_install() {
	# Clean up manually installed service files to avoid conflicts
	rm -f /usr/lib/systemd/user/hapi-hub.service
	rm -f /usr/lib/systemd/user/hapi-runner.service
}

pre_upgrade() {
	pre_install
}

post_install() {
	echo "==> To use the official relay service, edit hapi-hub.service:"
	echo "    systemctl --user edit hapi-hub.service"
	echo "    Change ExecStart to: /usr/bin/hapi hub --relay"
	echo ""
	echo "==> To enable and start the services:"
	echo "    systemctl --user enable --now hapi-hub.service"
	echo "    systemctl --user enable --now hapi-runner.service"
}

post_upgrade() {
	echo "==> Reloading systemd user daemon..."
	systemctl --user daemon-reload || true
	post_install
}