Last active
October 24, 2016 10:33
-
-
Save dmitriysafronov/5793b3dc3bde8e08d6cd80d2eca92a53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -n "$(which apt)" ]]; then | |
apt install -y wget unzip automake autoconf gcc make asterisk-dev | |
DESTDIR=/usr/lib/asterisk/modules | |
LDFLAGS="-z muldefs" | |
elif [[ -n "$(which yum)" ]]; then | |
yum install -y wget unzip automake autoconf gcc make asterisk-devel | |
DESTDIR=/usr/lib64/asterisk/modules | |
LDFLAGS="" | |
else | |
echo "No appropriate package manager!" | |
exit 1 | |
fi | |
export DESTDIR | |
export LDFLAGS | |
######## | |
OLD_PWD="${PWD}" | |
######## | |
cd /usr/src | |
wget https://github.com/oleg-krv/asterisk-chan-dongle/archive/asterisk13.zip | |
unzip -o asterisk13.zip | |
rm -f asterisk13.zip | |
cd asterisk-chan-dongle-asterisk13 | |
aclocal && autoconf && automake -a | |
./configure | |
make | |
make install | |
######## | |
cp -f --remove-destination etc/dongle.conf /root/dongle.conf | |
cp -f --remove-destination etc/extensions.conf /root/dongle-extensions.conf | |
######## | |
cd "${OLD_PWD}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment