#!/bin/bash # Script to download khanat docker package mkdir -p $HOME/Public ipaddress="" echo "$(date "+%Y/%m/%d %H:%M:%S") get client package" wget http://$ipaddress/client/smokey_linux64.tar.gz -O smokey_linux64.tar.gz echo "$(date "+%Y/%m/%d %H:%M:%S") clean old client" if [[ -d Khanat_Linux64 ]] then rm -rf Khanat_Linux64 || exit 2 fi echo "$(date "+%Y/%m/%d %H:%M:%S") install new client" tar xvzf smokey_linux64.tar.gz || exit 2 echo "$(date "+%Y/%m/%d %H:%M:%S") configure client" sed -i 's/lirria.khaganat.net/'"$ipaddress"'/g' Khanat_Linux64/client_default.cfg echo -en "Client khanat installed & configured\nGo to Khanat_Linux64 directory and launch client\n" echo -en "(cd Khanat_Linux64;./khanat_client)\n"