Make compatible with Debian 12 too
This commit is contained in:
parent
0ad721b1e0
commit
8e986a98e2
|
@ -62,7 +62,7 @@ fi
|
||||||
# Install what we need
|
# Install what we need
|
||||||
apt update -y && apt full-upgrade -y
|
apt update -y && apt full-upgrade -y
|
||||||
apt install --assume-yes \
|
apt install --assume-yes \
|
||||||
git tmux unzip curl vim openjdk-11-jdk xz-utils python3-venv python3-pip \
|
git tmux unzip curl vim xz-utils python3-venv python3-pip \
|
||||||
python3-dev apt virtualenv python3-virtualenv libjpeg-dev zlib1g-dev \
|
python3-dev apt virtualenv python3-virtualenv libjpeg-dev zlib1g-dev \
|
||||||
fuse g++ gcc curl firewalld automake autoconf libtool \
|
fuse g++ gcc curl firewalld automake autoconf libtool \
|
||||||
libcurl3-dev libc-ares-dev zlib1g-dev libncurses-dev make python3-aiohttp \
|
libcurl3-dev libc-ares-dev zlib1g-dev libncurses-dev make python3-aiohttp \
|
||||||
|
|
|
@ -25,6 +25,8 @@ if [ -z ${mindustry_version} ] || [ "${mindustry_version}" = "latest" ]; then
|
||||||
mindustry_version=$(curl -s https://api.github.com/repos/Anuken/Mindustry/releases?per_page=1 | jq -r '.[0]["tag_name"]' | cut -c2-)
|
mindustry_version=$(curl -s https://api.github.com/repos/Anuken/Mindustry/releases?per_page=1 | jq -r '.[0]["tag_name"]' | cut -c2-)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
apt install --assume-yes openjdk-17-jre
|
||||||
|
|
||||||
# Mindustry
|
# Mindustry
|
||||||
mkdir -p /opt/mindustry-${mindustry_version}
|
mkdir -p /opt/mindustry-${mindustry_version}
|
||||||
curl --location https://github.com/Anuken/Mindustry/releases/download/v${mindustry_version}/server-release.jar > /opt/mindustry-${mindustry_version}/mindustry.jar
|
curl --location https://github.com/Anuken/Mindustry/releases/download/v${mindustry_version}/server-release.jar > /opt/mindustry-${mindustry_version}/mindustry.jar
|
||||||
|
@ -38,7 +40,7 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/var/lib/mindustry
|
WorkingDirectory=/var/lib/mindustry
|
||||||
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62548 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -jar /opt/mindustry-${mindustry_version}/mindustry.jar "config autosave true","config autosaveSpacing 120","host"
|
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62548 /usr/bin/java -jar /opt/mindustry-${mindustry_version}/mindustry.jar "config autosave true","config autosaveSpacing 120","host"
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
User=${systemuser}
|
User=${systemuser}
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,7 @@ if [ -d /opt/openspades/env ]; then
|
||||||
fi
|
fi
|
||||||
virtualenv -p python3 /opt/openspades/env
|
virtualenv -p python3 /opt/openspades/env
|
||||||
source /opt/openspades/env/bin/activate
|
source /opt/openspades/env/bin/activate
|
||||||
pip install -U piqueserver
|
pip install -U git+https://github.com/piqueserver/piqueserver
|
||||||
pip install "twisted<21.0.0" # Twisted 22 removed getPage that piqueserver 1.0.0 depends on
|
|
||||||
pip install "MarkupSafe==2.0.1" # MarkupSafe removed soft_unicode that piqueserver 1.0.0 depends on
|
|
||||||
sudo -u ${systemuser} /opt/openspades/env/bin/piqueserver --copy-config
|
sudo -u ${systemuser} /opt/openspades/env/bin/piqueserver --copy-config
|
||||||
sudo -u ${systemuser} sed -i ${systemuserhome}/.config/piqueserver/config.toml \
|
sudo -u ${systemuser} sed -i ${systemuserhome}/.config/piqueserver/config.toml \
|
||||||
-e s/"piqueserver instance"/"onFOSS"/ \
|
-e s/"piqueserver instance"/"onFOSS"/ \
|
||||||
|
|
Loading…
Reference in New Issue