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