-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-freeswitch
45 lines (37 loc) · 1.77 KB
/
install-freeswitch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
##Description : For install freeswitch1.8 on debian 9
##Author : herbiel
wget -O - https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/debian-release/ stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src http://files.freeswitch.org/repo/deb/debian-release/ stretch main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update
# Install dependencies required for the build
apt-get build-dep freeswitch
# then let's get the source. Use the -b flag to get a specific branch
cd /usr/src/
git clone https://github.com/signalwire/freeswitch.git -bv1.8 freeswitch
cd freeswitch
# Because we're in a branch that will go through many rebases, it's
# better to set this one, or you'll get CONFLICTS when pulling (update).
git config pull.rebase true
# ... and do the build
./bootstrap.sh -j
./configure --enable-system-lua --without-pgsql --prefix=/usr/local/freeswitch --sysconfdir=/etc --localstatedir=/var --datadir=/usr/share
make
make install
# Install audio files:
make cd-sounds-install cd-moh-install
adduser freeswitch --disabled-password --quiet --system --home /usr/local/freeswitch
# To update an installed build:
cd /usr/src/freeswitch
make current
# Create link for freeswitch
wget https://raw.githubusercontent.com/herbiel/pubilc-shell/master/freeswitch.service -P /lib/systemd/system/
chown -R freeswitch:daemon /usr/local/freeswitch
chown -R freeswitch:daemon /etc/freeswitch
chown -R freeswitch:daemon /var/lib/freeswitch
chown -R freeswitch:daemon /usr/share/freeswitch
chown -R freeswitch:daemon /var/run/freeswitch
chown -R freeswitch:daemon /var/log/freeswitch
# set chmod for freeswitch and start quick script
chown -R freeswitch:daemon /usr/local/freeswitch