2016-04-29 13:24:22 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2016-06-14 01:40:49 +01:00
|
|
|
#move to script directory so all relative paths work
|
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
2017-03-04 14:00:30 -07:00
|
|
|
#includes
|
|
|
|
|
. ./resources/config.sh
|
2016-09-30 23:59:58 +01:00
|
|
|
. ./resources/colors.sh
|
2017-03-04 15:10:20 -07:00
|
|
|
. ./resources/environment.sh
|
2016-05-26 11:55:14 +01:00
|
|
|
|
2016-06-08 14:04:57 +01:00
|
|
|
# removes the cd img from the /etc/apt/sources.list file (not needed after base install)
|
|
|
|
|
sed -i '/cdrom:/d' /etc/apt/sources.list
|
|
|
|
|
|
2017-03-04 14:00:30 -07:00
|
|
|
#Update to latest packages
|
|
|
|
|
verbose "Update installed packages"
|
2019-02-17 08:43:57 -07:00
|
|
|
apt-get update && apt-get upgrade -y
|
2016-04-29 13:24:22 -06:00
|
|
|
|
2017-02-24 18:15:15 -07:00
|
|
|
#Add dependencies
|
2018-09-27 09:16:45 -06:00
|
|
|
apt-get install -y wget
|
2017-02-24 18:15:15 -07:00
|
|
|
apt-get install -y lsb-release
|
2018-09-03 12:48:20 -06:00
|
|
|
apt-get install -y systemd
|
|
|
|
|
apt-get install -y systemd-sysv
|
2018-09-06 09:54:26 -06:00
|
|
|
apt-get install -y ca-certificates
|
2018-09-03 12:48:20 -06:00
|
|
|
apt-get install -y dialog
|
2018-09-03 12:49:05 -06:00
|
|
|
apt-get install -y nano
|
2020-06-04 09:52:49 -06:00
|
|
|
apt-get install -y net-tools
|
2018-10-10 18:27:44 -06:00
|
|
|
|
|
|
|
|
#SNMP
|
2018-10-10 18:24:24 -06:00
|
|
|
apt-get install -y snmpd
|
2018-10-10 18:27:44 -06:00
|
|
|
echo "rocommunity public" > /etc/snmp/snmpd.conf
|
2018-10-10 18:49:01 -06:00
|
|
|
service snmpd restart
|
2017-02-24 18:15:15 -07:00
|
|
|
|
2016-04-29 13:24:22 -06:00
|
|
|
#IPTables
|
2016-05-26 11:55:14 +01:00
|
|
|
resources/iptables.sh
|
2016-04-29 13:24:22 -06:00
|
|
|
|
2017-05-10 22:03:58 -06:00
|
|
|
#sngrep
|
|
|
|
|
resources/sngrep.sh
|
|
|
|
|
|
2017-01-11 21:12:21 -07:00
|
|
|
#FusionPBX
|
|
|
|
|
resources/fusionpbx.sh
|
|
|
|
|
|
2016-08-02 18:14:57 +01:00
|
|
|
#PHP
|
|
|
|
|
resources/php.sh
|
|
|
|
|
|
2019-02-17 08:58:35 -07:00
|
|
|
#NGINX web server
|
|
|
|
|
resources/nginx.sh
|
|
|
|
|
|
2016-04-29 13:24:22 -06:00
|
|
|
#FreeSWITCH
|
2017-03-04 14:00:30 -07:00
|
|
|
resources/switch.sh
|
2016-04-29 13:24:22 -06:00
|
|
|
|
2021-03-08 08:33:20 -07:00
|
|
|
#Fail2ban
|
|
|
|
|
resources/fail2ban.sh
|
|
|
|
|
|
2016-04-29 13:24:22 -06:00
|
|
|
#Postgres
|
2017-12-30 10:42:47 -07:00
|
|
|
resources/postgresql.sh
|
2016-04-29 13:24:22 -06:00
|
|
|
|
|
|
|
|
#set the ip address
|
|
|
|
|
server_address=$(hostname -I)
|
|
|
|
|
|
2017-01-11 21:12:21 -07:00
|
|
|
#add the database schema, user and groups
|
|
|
|
|
resources/finish.sh
|