mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-11 18:48:26 +00:00
added upgrade command, added support for release channels
This commit is contained in:
parent
2652f5f752
commit
201c8879d6
@ -4,21 +4,23 @@
|
||||
# Net Installer, used with curl
|
||||
#
|
||||
|
||||
channel=${2:-master} # if defined by 2nd argument install the defined version, otherwise install master
|
||||
|
||||
# Download and untar installation files
|
||||
cd /tmp
|
||||
wget https://github.com/FezVrasta/ark-server-tools/archive/master.tar.gz
|
||||
tar -zxvf master.tar.gz
|
||||
wget https://github.com/FezVrasta/ark-server-tools/archive/${channel}.tar.gz
|
||||
tar -zxvf ${channel}.tar.gz
|
||||
|
||||
# Install ARK Server Tools
|
||||
cd ark-server-tools-master/tools
|
||||
cd ark-server-tools-${channel}/tools
|
||||
chmod +x install.sh
|
||||
sh install.sh $1 > /dev/null
|
||||
|
||||
status=$?
|
||||
|
||||
# Remove the installation files
|
||||
rm -f master.tar.gz
|
||||
rm -rf /tmp/ark-server-tools-master
|
||||
rm -f ${channel}.tar.gz
|
||||
rm -rf /tmp/ark-server-tools-${channel}
|
||||
|
||||
# Print messages
|
||||
case "$status" in
|
||||
|
||||
@ -318,8 +318,23 @@ case "$1" in
|
||||
status)
|
||||
printStatus
|
||||
;;
|
||||
upgrade)
|
||||
echo "arkmanager v${arkstVersion}: Checking for updates...
|
||||
arkstLatestVersion=`curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/${arkstChannel}/.version`
|
||||
if [ $arkstLatestVersion -gt $arkstVersion ]; then
|
||||
read -p "A new version was found! Do you want to upgrade ARK Server Tools to v${$arkstLatestVersion}?" -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/${arkstChannel}/netinstall.sh | sudo bash -s ${steamcmd_user} ${arkstChannel}
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
echo "Your ARK server tools are already up to date"
|
||||
fi
|
||||
;;
|
||||
-h|--help)
|
||||
echo -e "Usage: arkmanager [OPTION]\n"
|
||||
echo -e "Usage: arkmanager[OPTION]\n"
|
||||
echo "Option Description"
|
||||
echo "start Starts the server"
|
||||
echo "stop Stops the server"
|
||||
@ -330,9 +345,10 @@ case "$1" in
|
||||
echo "checkupdate Check for a new ARK server version"
|
||||
echo "boradcast PLACEHOLDER, not supported yet"
|
||||
echo "status Returns the status of the current ARK server instance"
|
||||
echo "upgrade Check for a new ARK Server Tools version and upgrades it if needed"
|
||||
;;
|
||||
*)
|
||||
echo "arkmanager: no command specified"
|
||||
echo "arkmanager v${arkstVersion}: no command specified"
|
||||
echo "Try 'arkmanager -h' or 'arkmanager --help' for more information."
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
arkstVersion="1.2" # used to print the version when needed and to check for updates
|
||||
arkstChannel="master" # change it to a different branch to get non-stable versions
|
||||
|
||||
# config SteamCMD
|
||||
steamcmdroot="/home/steam/steamcmd" # path of your steamcmd instance
|
||||
steamcmdexec="steamcmd.sh" # name of steamcmd executable
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user