Tom Butcher 7dbe7da4ee
Some checks reported errors
farmcontrol/farmcontrol-server/pipeline/head Something is wrong with the build of this commit
Overhauled server code.
2025-12-28 21:46:58 +00:00

23 lines
609 B
Bash
Executable File

#!/bin/bash
# Copy systemd service file
# The installation directory is usually /opt/Farm Control Server
# but we can try to find it if it's different.
APP_DIR="/opt/Farm Control Server"
if [ ! -d "$APP_DIR" ]; then
# Fallback to slugified name
APP_DIR="/opt/farmcontrol-server"
fi
cp "$APP_DIR/resources/farmcontrol-server.service" /etc/systemd/system/farmcontrol-server.service
# Reload systemd to recognize the new service
systemctl daemon-reload
# Enable the service to start on boot
systemctl enable farmcontrol-server.service
# Start the service
systemctl start farmcontrol-server.service