stardew-multiplayer-docker/init.sh

42 lines
1.2 KiB
Bash
Raw Normal View History

2019-04-09 16:54:50 +00:00
#!/bin/bash
if [ ! -d /data/Stardew ]; then
echo "Downloading Game"
mkdir -p /data/Stardew
mkdir -p /data/nexus
2019-04-09 17:31:55 +00:00
wget https://eris.cc/Stardew_latest.tar -qO /data/latest.tar
2019-04-09 16:54:50 +00:00
echo "Unpacking"
tar xvf /data/latest.tar -C /data/Stardew
2019-04-09 17:31:55 +00:00
fi
2019-04-09 16:54:50 +00:00
2019-04-09 17:31:55 +00:00
if [ ! -f /data/nexus.tar ]; then
2019-04-09 16:54:50 +00:00
echo "Downloading Modloader"
2019-04-09 17:31:55 +00:00
wget https://github.com/Pathoschild/SMAPI/releases/download/2.11.1/SMAPI-2.11.1-installer.zip -qO /data/nexus.zip
2019-04-09 16:54:50 +00:00
echo "Unpacking Modloader"
unzip nexus.zip -d /data/nexus/
echo "Installing Modloader"
/bin/bash -c "echo -e \"2\n/data/Stardew/Stardew\ Valley\n1\n\" | /usr/bin/mono /data/nexus/SMAPI\ 2.11.1\ installer/internal/unix-install.exe"
2019-04-09 17:31:55 +00:00
fi
if [ ! -f /data/mods.tar -o ! -f /data/always.zip ]; then
2019-04-09 16:54:50 +00:00
echo "Downloading Always On Mod"
2019-04-09 17:31:55 +00:00
wget https://eris.cc/always.zip -qO /data/always.zip
wget https://eris.cc/mods.tar -qO /data/mods.tar
2019-04-09 16:54:50 +00:00
unzip /data/always.zip -d /data/Stardew/Stardew\ Valley/Mods
2019-04-09 17:31:55 +00:00
tar xvf /data/mods.tar -C /data/Stardew/Stardew\ Valley/Mods/
2019-04-09 16:54:50 +00:00
fi
apt-get install -y xterm i3
Xvfb :10 -screen 0 1000x1000x24 -ac &
export DISPLAY=:10.0
x11vnc -display :10 -forever -shared -loop &
i3 &
2019-04-09 17:31:55 +00:00
2019-04-09 16:54:50 +00:00
TERM=xterm
/data/Stardew/Stardew\ Valley/StardewValley