#!/bin/bash

# log file info
LOGPATH=/var/log/astguiclient
LOGFILE=$LOGPATH/ubuntu-vici-install.log

# helper script versions
PREREQV=0.16
ASTERISKV=0.06
#SVNV=0.14

echo "Initializing Installer"

mkdir -p $LOGPATH

cd /tmp

wget http://download.vicidial.com/ubuntu/ubuntu-vici-prereq-$PREREQV.sh 2>> $LOGFILE >> $LOGFILE
wget http://download.vicidial.com/ubuntu/ubuntu-vici-asterisk-$ASTERISKV.sh 2>> $LOGFILE >> $LOGFILE
wget http://download.vicidial.com/ubuntu/ubuntu-vici-2.0.5.sh 2>> $LOGFILE >> $LOGFILE
wget http://download.vicidial.com/ubuntu/spinner 2>> $LOGFILE >> $LOGFILE


chmod 755 ubuntu-vici-prereq-$PREREQV.sh 2>> $LOGFILE >> $LOGFILE
chmod 755 ubuntu-vici-asterisk-$ASTERISKV.sh 2>> $LOGFILE >> $LOGFILE
chmod 755 ubuntu-vici-2.0.5.sh 2>> $LOGFILE >> $LOGFILE
chmod 755 spinner  2>> $LOGFILE >> $LOGFILE

./ubuntu-vici-prereq-$PREREQV.sh $LOGFILE 
./ubuntu-vici-asterisk-$ASTERISKV.sh $LOGFILE 
./ubuntu-vici-2.0.5.sh $LOGFILE 

rm ubuntu-vici-prereq-$PREREQV.sh 2>> $LOGFILE >> $LOGFILE
rm ubuntu-vici-asterisk-$ASTERISKV.sh 2>> $LOGFILE >> $LOGFILE
rm ubuntu-vici-2.0.5.sh 2>> $LOGFILE >> $LOGFILE
rm spinner  2>> $LOGFILE >> $LOGFILE

