fusionpbx-install.sh/debian/install.sh

79 lines
1.5 KiB
Bash
Raw Normal View History

2016-04-29 21:24:22 +02:00
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
2017-03-04 22:00:30 +01:00
#includes
. ./resources/config.sh
. ./resources/colors.sh
2017-03-04 23:10:20 +01:00
. ./resources/environment.sh
# 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 22:00:30 +01:00
#Update to latest packages
verbose "Update installed packages"
2017-08-03 17:34:11 +02:00
apt-get update && apt-get upgrade -y --force-yes
2016-04-29 21:24:22 +02:00
2017-02-25 02:15:15 +01:00
#Add dependencies
2018-09-27 17:16:45 +02:00
apt-get install -y wget
2017-02-25 02:15:15 +01:00
apt-get install -y lsb-release
2018-09-03 20:48:20 +02:00
apt-get install -y systemd
apt-get install -y systemd-sysv
2018-09-06 17:54:26 +02:00
apt-get install -y ca-certificates
2018-09-03 20:48:20 +02:00
apt-get install -y dialog
apt-get install -y nano
2018-10-11 02:27:44 +02:00
#SNMP
2018-10-11 02:24:24 +02:00
apt-get install -y snmpd
2018-10-11 02:27:44 +02:00
echo "rocommunity public" > /etc/snmp/snmpd.conf
2018-10-11 02:49:01 +02:00
service snmpd restart
2017-02-25 02:15:15 +01:00
2016-04-29 21:24:22 +02:00
#IPTables
resources/iptables.sh
2016-04-29 21:24:22 +02:00
2017-05-11 06:03:58 +02:00
#sngrep
resources/sngrep.sh
2017-01-12 05:12:21 +01:00
#FusionPBX
resources/fusionpbx.sh
2016-04-29 21:24:22 +02:00
#NGINX web server
resources/nginx.sh
2016-04-29 21:24:22 +02:00
#PHP
resources/php.sh
2016-04-29 21:24:22 +02:00
#Fail2ban
resources/fail2ban.sh
2016-04-29 21:24:22 +02:00
#FreeSWITCH
2017-03-04 22:00:30 +01:00
resources/switch.sh
2016-04-29 21:24:22 +02:00
#Postgres
2017-12-30 18:42:47 +01:00
resources/postgresql.sh
2016-04-29 21:24:22 +02:00
#set the ip address
server_address=$(hostname -I)
#restart services
systemctl daemon-reload
2018-10-11 02:49:01 +02:00
if [ ."$php_version" = ."5.6" ]; then
service php5-fpm restart
2017-03-04 21:54:52 +01:00
fi
2018-10-11 02:49:01 +02:00
if [ ."$php_version" = ."7.0" ]; then
service php7.0-fpm restart
fi
2018-10-11 02:49:01 +02:00
if [ ."$php_version" = ."7.1" ]; then
service php7.1-fpm restart
fi
if [ ."$php_version" = ."7.2" ]; then
service php7.2-fpm restart
fi
service nginx restart
service fail2ban restart
2016-04-29 21:24:22 +02:00
2017-01-12 05:12:21 +01:00
#add the database schema, user and groups
resources/finish.sh