#!/bin/bash

# Copy the binary to the deployment location
cp build/c_relay_x86 ~/Storage/c_relay/crelay

# Copy the service file to systemd (use the main service file)
sudo cp systemd/c-relay.service /etc/systemd/system/c-relay-local.service

# Reload systemd daemon to pick up the new service
sudo systemctl daemon-reload

# Enable the service (if not already enabled)
sudo systemctl enable c-relay-local.service

# Restart the service
sudo systemctl restart c-relay-local.service

# Show service status
sudo systemctl status c-relay-local.service --no-pager -l
