#!/bin/bash

echo '******************************************************'
echo 'APT operations'
echo '******************************************************'

#Try to kill unattended upgrades. They mess with automated installs and I like to
#have missing patches for labs...
sudo DEBIAN_FRONTEND=noninteractive apt remove -y unattended-upgrades

#Apt proxy for packer builds should be removed in final build
# sudo DEBIAN_FRONTEND=noninteractive cp /home/student/packer/00aptproxy /etc/apt/apt.conf.d/00aptproxy


sudo DEBIAN_FRONTEND=noninteractive apt update 
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y

echo '******************************************************'
echo 'Installing common packages'
echo '******************************************************'
sudo DEBIAN_FRONTEND=noninteractive apt install -y apt-transport-https arping auditd build-essential ca-certificates cpanminus curl expect fontconfig-config fonts-dejavu-core git john jq libcairo2-dev libffi-dev libfontconfig1 libfontconfig1 libpq-dev libpq-dev musl ncat net-tools nginx openjdk-11-jre-headless pipx policykit-1 postgresql postgresql-common python3-cairo python3-dev python3-dev python3-django python3-django-tagging python3-ldap python3-memcache python3-pip python3-simplejson python3-twisted python3-venv redis ruby-full software-properties-common supervisor tripwire unzip virtualenv
