Skip to content

Commit 900472a

Browse files
authored
Merge pull request #2 from vinanrra/v0.0.2
Fixed server version
2 parents db25eb3 + d2b4614 commit 900472a

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ENV PGID=1000
5151
ENV START_MODE=1
5252
ENV TEST_ALERT=no
5353
ENV TimeZone=Europe/Madrid
54-
ENV VERSION=stable
54+
ENV VERSION=public
5555
ENV MONITOR=yes
5656
ENV BACKUP=yes
5757
ENV LANG=en_US.utf8

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ docker run -d \
3333
-p 7777:7777/udp \
3434
-e START_MODE=1 \
3535
-e TEST_ALERT=NO \
36+
-e VERSION=public \
3637
-e BACKUP=YES \
3738
-e MONITOR=YES \
3839
-e PUID=1000 \
@@ -57,6 +58,7 @@ services:
5758
- TEST_ALERT=NO
5859
- BACKUP=YES # Backup server at 5 AM
5960
- MONITOR=YES # Keeps server up if crash
61+
- VERSION=public # Change between server versions
6062
volumes:
6163
- ./ServerFiles:/home/sfserver/serverfiles/ #Optional, serverfiles
6264
- ./log:/home/sfserver/log/ #Optional, logs
@@ -84,8 +86,9 @@ services:
8486
| `TEST_ALERT=YES` | Test alerts at start of server **optional** |
8587
| `BACKUP=YES` | Backup server at 5 AM (Only the latest 5 backups will be keep, maximum 30 days) [More info](https://docs.linuxgsm.com/commands/backup) **optional** |
8688
| `MONITOR=YES` | Monitor server status, if server crash this will restart it [More info](https://docs.linuxgsm.com/commands/monitor) **optional** |
87-
| `PUID=1000` | for UserID - see below for explanation |
88-
| `PGID=1000` | for GroupID - see below for explanation |
89+
| `VERSION=public` | Change server version, check [Branches](https://steamdb.info/app/1690800/depots/) to know the names **optional** |
90+
| `PUID=1000` | for UserID - see below for explanation **optional** |
91+
| `PGID=1000` | for GroupID - see below for explanation **optional** |
8992
| `TimeZone=Europe/Madrid` | for TimeZone - see [TZ Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for time zones **recomendable**|
9093
| `--restart unless-stopped` | Restart container always unlesss stopped manually **NEVER USE WITH START_MODE=4** |
9194

scripts/first_install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ source $scriptsDir/check_space.sh
4343

4444
mv -f common.cfg /home/sfserver/lgsm/config-lgsm/sfserver/common.cfg
4545

46+
sed -i "s/branch=".*"/branch="\"${VERSION,,}"\"/" /home/sfserver/lgsm/config-lgsm/sfserver/common.cfg
47+
4648
# Install Satisfactory Server
4749

4850
./sfserver auto-install

scripts/server_update.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#!/bin/bash
22
./sfserver update
33

4-
if [ "${VERSION,,}" == 'stable' ]
4+
if [ "${VERSION,,}" == 'public' ]
55
then
66
# Remove branch line
7-
sed -i '/branch/d' /home/sfserver/lgsm/config-lgsm/sfserver/sfserver.cfg
7+
sed -i 's/branch=".*"/branch=""/' /home/sfserver/lgsm/config-lgsm/sfserver/common.cfg
88
else
99
# Remove branch line if exist to avoid multiple branch lines
10-
sed -i '/branch/d' /home/sfserver/lgsm/config-lgsm/sfserver/sfserver.cfg
11-
12-
echo branch='"-beta $VERSION"' >> /home/sfserver/lgsm/config-lgsm/sfserver/sfserver.cfg
10+
sed -i "s/branch=".*"/branch="\"${VERSION,,}"\"/" /home/sfserver/lgsm/config-lgsm/sfserver/common.cfg
1311

1412
echo "
1513
=======================================================================
@@ -27,7 +25,7 @@
2725
=======================================================================
2826
IMPORTANT:
2927
30-
The server have been updated to ${VERSION,,}
28+
The server have been updated to latest ${VERSION,,} version
3129
More info: https://github.com/vinanrra/Docker-Satisfactory#start-modes
3230
=======================================================================
3331
"

0 commit comments

Comments
 (0)