diff --git a/ct/satisfactory.sh b/ct/satisfactory.sh index f46f2b8ddb..0c999c65bb 100644 --- a/ct/satisfactory.sh +++ b/ct/satisfactory.sh @@ -35,10 +35,10 @@ function update_script() { systemctl stop satisfactory msg_ok "Stopped ${APP}" - create_backup /root/.config/Epic/FactoryGame/Saved + create_backup /home/steam/.config/Epic/FactoryGame/Saved msg_info "Updating ${APP}" - if $STD /opt/steamcmd/steamcmd.sh \ + if $STD runuser -u steam -- /opt/steamcmd/steamcmd.sh \ +force_install_dir /opt/satisfactory/server \ +login anonymous \ +app_update 1690800 -beta public validate \ diff --git a/install/satisfactory-install.sh b/install/satisfactory-install.sh index 20e75246a3..830e9f3e72 100644 --- a/install/satisfactory-install.sh +++ b/install/satisfactory-install.sh @@ -19,16 +19,23 @@ $STD apt install -y \ lib32stdc++6 msg_ok "Installed Dependencies" -msg_info "Creating Application Directories" -mkdir -p /opt/satisfactory/server -msg_ok "Created Application Directories" +msg_info "Creating Steam User and Application Directories" +useradd --system \ + --create-home \ + --home-dir /home/steam \ + --shell /usr/sbin/nologin \ + steam +mkdir -p /opt/satisfactory/server /opt/steamcmd +chown -R steam:steam /opt/satisfactory /opt/steamcmd /home/steam +msg_ok "Created Steam User and Application Directories" fetch_and_deploy_from_url \ "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" \ "/opt/steamcmd" +chown -R steam:steam /opt/steamcmd msg_info "Installing Satisfactory Dedicated Server" -$STD /opt/steamcmd/steamcmd.sh \ +$STD runuser -u steam -- /opt/steamcmd/steamcmd.sh \ +force_install_dir /opt/satisfactory/server \ +login anonymous \ +app_update 1690800 -beta public validate \ @@ -44,8 +51,11 @@ After=network-online.target [Service] Type=simple +User=steam +Group=steam WorkingDirectory=/opt/satisfactory/server Environment=LANG=C.UTF-8 +Environment=HOME=/home/steam ExecStart=/opt/satisfactory/server/FactoryServer.sh -log Restart=on-failure RestartSec=10