File tree Expand file tree Collapse file tree
UIMod/onboard_bundled/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -e
23
34# Check if running as root to prevent installing a service as root
45if [[ $( id -u) = 0 ]]; then
@@ -17,14 +18,15 @@ if [[ -z "$BASEDIR" || ! -d "$BASEDIR" ]]; then
1718fi
1819
1920# Find the last modified SSUI binary if multiple exist
20- SSUI_BINARY=$( ls -t $BASEDIR /StationeersServerControlv* 2> /dev/null | head -n 1 | cut -c 1- )
21+ SSUI_BINARY=$( ls -t $BASEDIR /StationeersServerControlv* 2> /dev/null | head -n 1)
2122if [[ -z " $SSUI_BINARY " || ! -x " $SSUI_BINARY " ]]; then
2223 echo " Error: Could not find executable StationeersServerControl binary in $BASEDIR ."
2324 exit 1
2425fi
2526
2627# If the systemd service file already exists, just exec the SSUI binary
2728if [[ -f /etc/systemd/system/ssui.service ]]; then
29+ echo " Service already installed. Starting SSUI..."
2830 exec " $SSUI_BINARY "
2931fi
3032
@@ -36,7 +38,7 @@ After=network.target
3638
3739[Service]
3840Type=simple
39- Restart=on-failure
41+ Restart=always
4042RestartSec=5s
4143User=$( whoami)
4244WorkingDirectory=$BASEDIR
You can’t perform that action at this time.
0 commit comments