Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Variabelen, geef hier de versie in
- ASTERISKV="14.2.0"
- # Systeemvariabelen
- PATH=/usr/lib/ccache:$PATH
- DEB_CFLAGS_SET="-O3 -march=native -flto -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
- DEB_CXXFLAGS_SET="-O3 -march=native -flto -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
- DEB_FFLAGS_SET="-O3"
- DEB_LDFLAGS_SET="-Wl,-z,relro -flto"
- # Downloaden, uitpakken en opschonen sources
- cd /usr/local/src
- curl -Lo asterisk.tar.gz http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-$ASTERISKV.tar.gz
- tar -zxf asterisk.tar.gz
- rm -f asterisk.tar.gz
- cd /usr/local/src/asterisk-$ASTERISKV
- make clean
- # Downloaden MP3-addon
- contrib/scripts/get_mp3_source.sh
- # Voorbereiden
- ./bootstrap.sh
- export PTLIB_CONFIG=/usr/lib/pkgconfig
- # Configureren
- ./configure \
- CFLAGS="-DPJ_HAS_IPV6=1 -fPIC -O3 -march=native -flto" \
- CXXFLAGS="-fPIC -O3 -march=native -flto" \
- --with-pjproject-bundled \
- --with-mysqlclient=/usr/local/mysql
- make menuselect
- # Installeren en opschonen
- make -j3 && sudo make install && sudo ldconfig
- rm -rf /usr/local/src/asterisk-$ASTERISKV
- sudo chown asterisk. /var/run/asterisk && sudo chown -R asterisk. /etc/asterisk && sudo chown -R asterisk. /var/{lib,log,spool}/asterisk && sudo chown -R asterisk. /usr/lib/asterisk && sudo rm -f /etc/init.d/asterisk
- sudo update-rc.d -f asterisk remove
- # Vergeet niet de service te herstarten
- echo "Vergeet niet de service te herstarten: sudo systemctl restart freepbx"
Advertisement
Add Comment
Please, Sign In to add comment