From f6849cabbe3c656e1d73e017d253ea6d9d3d0078 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 23 Jan 2021 19:51:39 +0700 Subject: Makefile: add task to deploy and restart the rescahed service on macos Executing `make deploy-macos` will build the binaries and deploy it to DIR_BIN and stop the current running rescached service to allow it to restart automatically. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 9895431..1efefaf 100644 --- a/Makefile +++ b/Makefile @@ -139,6 +139,12 @@ install-macos: DIR_RESCACHED=/usr/local/share/rescached install-macos: build install-common cp _scripts/info.kilabit.rescached.plist /Library/LaunchDaemons/ +deploy-macos: DIR_BIN=/usr/local/bin +deploy-macos: build + sudo cp _bin/$(GOOS)_$(GOARCH)/rescached $(DIR_BIN)/ + sudo cp _bin/$(GOOS)_$(GOARCH)/resolver $(DIR_BIN)/ + sudo launchctl stop info.kilabit.rescached + uninstall-macos: DIR_BIN=/usr/local/bin uninstall-macos: DIR_MAN=/usr/local/share/man uninstall-macos: DIR_RESCACHED=/usr/local/share/rescached -- cgit v1.3