update log names to apt

This commit is contained in:
ducoterra
2018-09-28 20:33:52 -04:00
parent 0fa8f5495d
commit baaae97726
2 changed files with 5 additions and 6 deletions

View File

@@ -4,14 +4,13 @@
################################################################################
# source vars
.vars
export vars
# check if root
if [[ $EUID -ne 0 ]]; then
echo -e "This script must be run as root"
exit 1
fi
cd /root/
tput setaf 2
echo -e "Installing dependencies"
@@ -26,9 +25,9 @@ packages=(gcc wget nginx ufw sqlite3 bzip2 zlib1g-dev libffi-dev openssl)
for package in ${packages[@]};
do
echo -e "\tInstalling $package"
yum -y install $package 1>> $yumlogloc 2>> $yumlogloc 3>> $yumlogloc
sudo apt install -y $package 1>> $aptlogloc 2>> $aptlogloc 3>> $aptlogloc
if [ $? -ne 0 ] ; then
echo -e "yum failed to install $package. $yumlogmsg"
echo -e "yum failed to install $package. $aptlogmsg"
exit 1
fi
done

4
vars
View File

@@ -8,8 +8,8 @@ export gitkey="" # IdentityFile
# general install settings
export logdir="/var/log/djangosetup/"
export yumlogloc=$logdir"yum.log"
export yumlogmsg="See $yumlogloc for more info."
export aptlogloc=$logdir"apt.log"
export aptlogmsg="See $aptlogloc for more info."
export firelogloc=$logdir"firewall.log"
export firelogmsg="See $firelogloc for more info."
export pylogloc=$logdir"python.log"