fusionpbx-install.sh/debian/install.sh

58 lines
1.0 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
. ./resources/arguments.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"
2016-04-29 21:24:22 +02:00
apt-get upgrade && apt-get update -y --force-yes
2017-02-25 02:15:15 +01:00
#Add dependencies
apt-get install -y lsb-release
2016-04-29 21:24:22 +02:00
#IPTables
resources/iptables.sh
2016-04-29 21:24:22 +02:00
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
resources/postgres.sh
2016-04-29 21:24:22 +02:00
#set the ip address
server_address=$(hostname -I)
#restart services
systemctl daemon-reload
2017-03-04 21:54:52 +01:00
if [ ."$php_version" = ."5" ]; then
systemctl restart php5-fpm
2017-03-04 21:54:52 +01:00
fi
if [ ."$php_version" = ."7" ]; then
systemctl restart php7.0-fpm
fi
systemctl restart nginx
systemctl restart fail2ban
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