install and netinstall can now update existing installation

This commit is contained in:
FezVrasta 2015-06-21 14:09:51 +02:00
parent 753a86eecb
commit fb2110eb24
2 changed files with 26 additions and 9 deletions

View File

@ -12,13 +12,24 @@ tar -zxvf master.tar.gz
# Install ARK Server Tools
cd ark-server-tools-master/tools
chmod +x install.sh
if [[ -n $(sh install.sh $1) ]]; then
echo "Something where wrong :("
else
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
fi
sh install.sh $1
status = $?
# Remove the installation files
rm -f master.tar.gz
rm -rf /tmp/ark-server-tools-master
if [ $status == 0 ]; then
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
fi
if [ $status == 1 ]; then
echo "Something where wrong :("
fi
if [ $status == 2 ]; then
echo "WARNING: A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it."
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
fi

View File

@ -13,14 +13,20 @@ if [ ! -z $1 ]; then
mkdir -p /var/log/arktools
chown $1 /var/log/arktools
# Copy arkmanager.cfg inside linux configuation folder
mkdir -p /etc/arkmanager
mv arkmanager.cfg /etc/arkmanager/arkmanager.cfg
chown $1 /etc/arkmanager/arkmanager.cfg
# Copy arkmanager.cfg inside linux configuation folder if it doesn't already exists
if [ -f /etc/arkmanager/arkmanager.cfg ]; then
mkdir -p /etc/arkmanager
cp -n arkmanager.cfg /etc/arkmanager/arkmanager.cfg
chown $1 /etc/arkmanager/arkmanager.cfg
else
echo "A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it.";
exit 2
fi
else
echo "You must specify your system steam user who own steamcmd directory to install ARK Tools."
echo "Usage: ./install.sh steam"
exit 1
fi
exit 0