From baaae97726995c9488d68d7bac0d698c94d12faf Mon Sep 17 00:00:00 2001 From: ducoterra Date: Fri, 28 Sep 2018 20:33:52 -0400 Subject: [PATCH] update log names to apt --- install.sh | 7 +++---- vars | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 9ecd0fe..964f240 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/vars b/vars index 0e98ef9..7e5132e 100644 --- a/vars +++ b/vars @@ -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"