#!/bin/sh
echo " " ;
echo "     - Archive HLTV Recordings... ... ....Please Wait." ;
echo " " ;
sleep 1 ;
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ;
echo " " ;
sleep 1 ;
echo "     - Sending TERM-Signal... ... ....." ;
echo " " ;
sleep 1 ;
killall -qvw hltv ;
echo "  " ;
sleep 5 ;
now=$(date +"%d-%m_h%Hm%Ms%S_%Y") ;
echo "  " ;
sleep 5 ;
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ;
echo " " ;
sleep 5 ;
echo "     - Create HLTV Archive...  HLTV_-_$now.tar.gz " ; 
echo " " ;
sleep 5 ;
cd /home/$USER/servers/hltv/cstrike ;
echo " " ;
sleep 5 ;
echo "     - Archive HLTV Recordings into  HLTV_-_$now.tar.gz........" ;
echo " " ;
sleep 5 ;
tar cvzf HLTV_-_$now.tar.gz *.dem ;
echo " " ;
sleep 5 ;
echo "     - Completed HLTV_-_$now.tar.gz Archive Process........" ;
echo " " ;
sleep 2 ;
echo "     - Copy  HLTV_-_$now.gz to Fastdownload Archive........." ;
echo " " ;
sleep 2 ;
cp -avr *.gz /home/www/HLTV ;
echo " " ;
sleep 2 ;
echo "     - HLTV_Archive Copy Completed........" ;
echo " " ;
sleep 2 ;
echo "     - Clean HLTV Server, delete old demo Files........" ;
echo " " ;
sleep 2 ;
rm -v *.dem ;
sleep 2 ;
rm -v *.gz ;
echo " " ;
sleep 2 ;
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ;
echo " " ;
sleep 2 ;
echo "     - HLTV Download url: http://195.154.217.204/HLTV/HLTV_-_$now.tar.gz "
echo " " ;
