revert changes

This commit is contained in:
ducoterra
2018-11-25 16:38:47 -05:00
2 changed files with 9 additions and 9 deletions

View File

@@ -3,27 +3,27 @@
# Installs Dependencies automatically # Installs Dependencies automatically
################################################################################ ################################################################################
# source vars
source vars
# check if root # check if root
if [[ $EUID -ne 0 ]]; then if [ $EUID -ne 0 ] ; then
echo -e "This script must be run as root" echo -e "This script must be run as root"
exit 1 exit 1
fi fi
# source vars
./vars
tput setaf 2 tput setaf 2
echo -e "Installing dependencies" echo -e "Installing dependencies"
tput setaf 9 tput setaf 9
# create necessary dirs # create necessary dirs
if [ ! -d $logdir ] ; then if [ ! -d $logdir ] ; then
mkdir $logdir mkdir $logdir
fi fi;
# install dependencies # install dependencies
packages=(gcc wget nginx ufw make sqlite3 bzip2 openssl libffi-dev libssl-dev libsqlite3-dev zlib1g-dev libbz2-dev libpq-dev) packages=(gcc wget nginx ufw make sqlite3 bzip2 openssl libffi-dev libssl-dev libsqlite3-dev zlib1g-dev libbz2-dev libpq-dev);
echo -e "\tRunning apt update" echo -e "\tRunning apt update";
apt update apt update 1> $aptlogloc 2>> $aptlogloc 3>> $aptlogloc;
for package in ${packages[@]}; for package in ${packages[@]};
do do
echo -e "\tInstalling $package" echo -e "\tInstalling $package"
@@ -38,7 +38,7 @@ done
ports=(22 80 443) ports=(22 80 443)
for port in ${ports[@]}; for port in ${ports[@]};
do do
echo -e "ufw allow $port/tcp" > 1>> $firelogloc 2>> $firelogloc echo -e "ufw allow $port/tcp" 1>> $firelogloc 2>> $firelogloc
ufw allow $port/tcp 1>> $firelogloc 2>> $firelogloc ufw allow $port/tcp 1>> $firelogloc 2>> $firelogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "\tfirewall failed to update port $port correctly. $firelogmsg" echo -e "\tfirewall failed to update port $port correctly. $firelogmsg"

0
vars Normal file → Executable file
View File