Check for systemd service and stop before installing
This commit is contained in:
parent
36121c82ae
commit
38dd289eb5
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/hedgewars.service ]; then
|
||||||
|
systemctl stop hedgewars
|
||||||
|
fi
|
||||||
|
|
||||||
# Hedgewars
|
# Hedgewars
|
||||||
# Create SystemD unit
|
# Create SystemD unit
|
||||||
cat > /etc/systemd/system/hedgewars.service <<EOF
|
cat > /etc/systemd/system/hedgewars.service <<EOF
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/mindustry.service ]; then
|
||||||
|
systemctl stop mindustry
|
||||||
|
fi
|
||||||
|
|
||||||
# Mindustry
|
# Mindustry
|
||||||
mkdir -p /opt/mindustry-v${mindustry_version}
|
mkdir -p /opt/mindustry-v${mindustry_version}
|
||||||
curl --location https://github.com/Anuken/Mindustry/releases/download/v${mindustry_version}/server-release.jar > /opt/mindustry-v${mindustry_version}/mindustry.jar
|
curl --location https://github.com/Anuken/Mindustry/releases/download/v${mindustry_version}/server-release.jar > /opt/mindustry-v${mindustry_version}/mindustry.jar
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/openhv.service ]; then
|
||||||
|
systemctl stop openhv
|
||||||
|
fi
|
||||||
|
|
||||||
# Install OpenHV
|
# Install OpenHV
|
||||||
mkdir -p /opt/openhv-${openhv_version}
|
mkdir -p /opt/openhv-${openhv_version}
|
||||||
curl --location "https://github.com/OpenHV/OpenHV/releases/download/${openhv_version}/OpenHV-${openhv_version}-x86_64.AppImage" > /opt/openhv-${openhv_version}/OpenHV-x86_64.AppImage
|
curl --location "https://github.com/OpenHV/OpenHV/releases/download/${openhv_version}/OpenHV-${openhv_version}-x86_64.AppImage" > /opt/openhv-${openhv_version}/OpenHV-x86_64.AppImage
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/openspades.service ]; then
|
||||||
|
systemctl stop openspades
|
||||||
|
fi
|
||||||
|
|
||||||
# OpenSpades
|
# OpenSpades
|
||||||
mkdir -p /opt/openspades
|
mkdir -p /opt/openspades
|
||||||
virtualenv -p python3 /opt/openspades/env
|
virtualenv -p python3 /opt/openspades/env
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
echo "Installing SuperTuxKart ${stk_version}"
|
echo "Installing SuperTuxKart ${stk_version}"
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/supertuxkart.service ]; then
|
||||||
|
systemctl stop supertuxkart
|
||||||
|
fi
|
||||||
|
|
||||||
# Install SuperTuxKart
|
# Install SuperTuxKart
|
||||||
stk_dir="/opt/SuperTuxKart-${stk_version}"
|
stk_dir="/opt/SuperTuxKart-${stk_version}"
|
||||||
mkdir -p ${stk_dir}
|
mkdir -p ${stk_dir}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/teeworlds.service ]; then
|
||||||
|
systemctl stop teeworlds
|
||||||
|
fi
|
||||||
|
|
||||||
# Teeworlds
|
# Teeworlds
|
||||||
teeworld_directory="/opt/teeworlds-${teeworlds_version}"
|
teeworld_directory="/opt/teeworlds-${teeworlds_version}"
|
||||||
mkdir -p ${teeworld_directory}
|
mkdir -p ${teeworld_directory}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/unvanquished.service ]; then
|
||||||
|
systemctl stop unvanquished
|
||||||
|
fi
|
||||||
|
|
||||||
# Unvanquished
|
# Unvanquished
|
||||||
unvanquished_directory="/opt/unvanquished-${unvanquished_version}"
|
unvanquished_directory="/opt/unvanquished-${unvanquished_version}"
|
||||||
curl --location "https://github.com/Unvanquished/Unvanquished/releases/download/v${unvanquished_version}/unvanquished_${unvanquished_version}.zip" > ${TMPDIR:-/tmp}/unvanquished.zip
|
curl --location "https://github.com/Unvanquished/Unvanquished/releases/download/v${unvanquished_version}/unvanquished_${unvanquished_version}.zip" > ${TMPDIR:-/tmp}/unvanquished.zip
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/xonotic.service ]; then
|
||||||
|
systemctl stop xonotic
|
||||||
|
fi
|
||||||
|
|
||||||
# Xonotic
|
# Xonotic
|
||||||
xonotic_directory="/opt/xonotic-${xonotic_version}"
|
xonotic_directory="/opt/xonotic-${xonotic_version}"
|
||||||
curl --location https://dl.xonotic.org/xonotic-${xonotic_version}.zip > ${TMPDIR:-/tmp}/xonotic.zip
|
curl --location https://dl.xonotic.org/xonotic-${xonotic_version}.zip > ${TMPDIR:-/tmp}/xonotic.zip
|
||||||
|
|
Reference in New Issue