diff --git a/Makefile b/Makefile index 8a17aaa..00becd7 100644 --- a/Makefile +++ b/Makefile @@ -46,3 +46,12 @@ uninstall: rm -f $(INSTALL_DIR)/$(BINARY_NAME) systemctl daemon-reload @echo "Uninstalled." + +update: + @echo "Updating server..." + systemctl stop $(SERVICE_NAME) + cp $(BINARY_NAME) $(INSTALL_DIR)/ + chmod +x $(INSTALL_DIR)/$(BINARY_NAME) + systemctl start $(SERVICE_NAME) + systemctl status $(SERVICE_NAME) + @echo "Server updated!"