Some checks reported errors
farmcontrol/farmcontrol-server/pipeline/head Something is wrong with the build of this commit
23 lines
609 B
Bash
Executable File
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
|
|
|