Add service file and install command (#27)

* Added systemd service file

* Added make install command (copies binary to local bin and adds service file

* Makefile has intall-prod and install-cloud commands
This commit is contained in:
Paulo Truta
2023-03-11 13:58:54 +01:00
committed by GitHub
parent d9720a48c9
commit 161ec76eb9
2 changed files with 43 additions and 0 deletions
+14
View File
@@ -33,3 +33,17 @@ test:
test-with-coverage:
go test -tags=unit -timeout=600s -v ./... -coverprofile=coverage.out
install-cloud: build-cloud
cp ./bin/edgeboxctl /usr/local/bin/edgeboxctl
cp ./edgeboxctl/edgeboxctl.service /lib/systemd/system/edgeboxctl.service
systemctl daemon-reload
@echo "Edgeboxctl installed successfully"
@echo "To start edgeboxctl run: systemctl start edgeboxctl"
install-prod: build-prod
cp ./bin/edgeboxctl /usr/local/bin/edgeboxctl
cp ./edgeboxctl/edgeboxctl.service /lib/systemd/system/edgeboxctl.service
systemctl daemon-reload
@echo "Edgeboxctl installed successfully"
@echo "To start edgeboxctl run: systemctl start edgeboxctl"