aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-01-23 19:51:39 +0700
committerShulhan <ms@kilabit.info>2021-01-23 19:51:39 +0700
commitf6849cabbe3c656e1d73e017d253ea6d9d3d0078 (patch)
tree663f55486fd4bf318cda29284a180d902b9930f6 /Makefile
parent629c97412b6ce72c3fb63fa8dd5c17518a73758b (diff)
downloadrescached-f6849cabbe3c656e1d73e017d253ea6d9d3d0078.tar.xz
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
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