Fix xbassets file. Add config for mod sync

This commit is contained in:
2024-11-12 17:54:01 +01:00
parent 4ab74aa49e
commit 03876f202e
5 changed files with 68 additions and 45 deletions
+5 -2
View File
@@ -21,7 +21,8 @@ RUN apt-get install -y \
curl \
wget \
build-essential \
jq
jq \
rsync
RUN mkdir -p /steamcmd
RUN mkdir -p /starbound
@@ -40,8 +41,10 @@ RUN /steamcmd/steamcmd.sh +force_install_dir /starbound/ +quit
COPY start.sh /start.sh
COPY install.sh /install.sh
COPY copy-mods.sh /copy-mods.sh
RUN chmod +x install.sh && \
chmod +x start.sh
chmod +x start.sh && \
chmod +x copy-mods.sh
ENTRYPOINT ["./start.sh"]
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
echo "Copying mods from /starbound/steamapps/workshop/content/211820/ to /starbound/mods/"
rsync -a --info=progress2 /starbound/steamapps/workshop/content/211820/ /starbound/mods/
echo "Finished"
+30 -24
View File
@@ -1,35 +1,41 @@
x-common-base-config: &common-base-config
build: .
environment:
- TZ=Europe/London
volumes:
- steam-data:/root/Steam
- type: bind
source: D:/temp/starbound
target: /starbound
bind:
create_host_path: true
network_mode: bridge
x-common-config: &common-config
<<: *common-base-config
#environment:
# - STEAM_USER=your_username_here
# - STEAM_PASS=your_password_here
services:
install:
build: .
environment:
- TZ=Europe/London
volumes:
- steam-data:/root/Steam
- type: bind
source: D:/temp/starbound
target: /starbound
bind:
create_host_path: true
<<: *common-config
tty: true
stdin_open: true
entrypoint: ./install.sh
network_mode: bridge
install-skip-verify:
<<: *common-config
tty: true
stdin_open: true
entrypoint: ./install.sh --skip-verify
install-workshop-mods:
<<: *common-base-config
entrypoint: ./copy-mods.sh
server:
build: .
environment:
- TZ=Europe/London
volumes:
- steam-data:/root/Steam
- type: bind
source: D:/temp/starbound
target: /starbound
bind:
create_host_path: true
<<: *common-base-config
ports:
- '28015:28015/udp'
- '28016:28016/udp'
- '21025:21025/tcp'
restart: unless-stopped
network_mode: bridge
volumes:
steam-data:
+27 -12
View File
@@ -1,19 +1,34 @@
#!/bin/bash
read -p "Enter Steam username: " STEAM_USER
read -sp "Enter Steam password: " STEAM_PASSWORD
skip_verify=false
for arg in "$@"; do
if [ "$arg" == "--skip-verify" ]; then
skip_verify=true
break
fi
done
if [ -z "$STEAM_USER" ]; then
read -p "Enter Steam username: " STEAM_USER
fi
if [ -z "$STEAM_PASS" ]; then
read -sp "Enter Steam password: " STEAM_PASS
fi
echo
/steamcmd/steamcmd.sh \
+force_install_dir /starbound/ \
+login "$STEAM_USER" "$STEAM_PASSWORD" \
+app_update 211820 validate \
+quit
if [ "$skip_verify" = false ]; then
/steamcmd/steamcmd.sh \
+force_install_dir /starbound/ \
+login "$STEAM_USER" "$STEAM_PASS" \
+app_update 211820 validate \
+quit
# Check if the SteamCMD login was successful
if [ $? -ne 0 ]; then
echo "SteamCMD failed. Check the output for more details."
exit 1
# Check if the SteamCMD login was successful
if [ $? -ne 0 ]; then
echo "SteamCMD failed. Check the output for more details."
exit 1
fi
fi
response=$(curl -s "https://api.github.com/repos/xStarbound/xStarbound/releases/latest")
@@ -28,7 +43,7 @@ if [ -n "$download_url" ]; then
curl -L "$download_url" -o /tmp/linux-static.tar.gz
echo "Downloading assets.pak from the latest release..."
curl -L "$download_url" -o /tmp/assets.pak
curl -L "$assets_url" -o /tmp/assets.pak
echo "Creating server folder"
mkdir -p /starbound/server
+1 -7
View File
@@ -2,10 +2,4 @@
cd /starbound/server
chmod +x xserver.sh
./xserver.sh
while :
do
echo "Press [CTRL+C] to stop.."
sleep 1
done
./xserver.sh