dl-extract-latest-asterisk: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
Created page with "This script will download asterisk, extract and install based on my selected modules. <pre> vi /opt/dl-extract-latest-asterisk.sh </pre> <pre> #!/bin/bash ver="${1:0:2}" if..."
 
No edit summary
Line 21: Line 21:
     cd /usr/src/asterisk-$1
     cd /usr/src/asterisk-$1


     ./configure && ./contrib/scripts/get_mp3_source.sh
     ./configure --with-jansson-bundled --with-pjproject-bundled
    ./contrib/scripts/get_mp3_source.sh
     make menuselect.makeopts
     make menuselect.makeopts



Revision as of 01:25, 20 October 2018

This script will download asterisk, extract and install based on my selected modules.

vi /opt/dl-extract-latest-asterisk.sh
#!/bin/bash

ver="${1:0:2}"

if [[ -z "$1" ]];
  then
     echo No Version number specified.
     echo usage example:
     echo -e '\t/opt/dl-extract-latest-asterisk 16.1.0'
  else
     wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-$ver-current.tar.gz -P /usr/src/
     tar xvf /usr/src/asterisk-$ver-current.tar.gz -C /usr/src/
     rm -f /usr/src/asterisk-$ver-current.tar.gz

     cd /usr/src/asterisk-$1

     ./configure  --with-jansson-bundled --with-pjproject-bundled
     ./contrib/scripts/get_mp3_source.sh
     make menuselect.makeopts

     menuselect/menuselect --disable-category MENUSELECT_CDR menuselect.makeopts
     menuselect/menuselect --disable-category MENUSELECT_CEL menuselect.makeopts
     menuselect/menuselect --disable-category MENUSELECT_MOH menuselect.makeopts
     menuselect/menuselect --disable-category MENUSELECT_EXTRA_SOUNDS menuselect.makeopts
     menuselect/menuselect --disable-category MENUSELECT_CORE_SOUNDS menuselect.makeopts
     menuselect/menuselect --enable app_macro  --enable format_mp3 --enable app_mysql --enable cdr_mysql --enable app_fax --disable res_ari --disable res_ari_model --disable res_phoneprov --disable pbx_ael --disable pbx_realtime menuselect.makeopts

    make
    make install
fi
chmode +x /opt/dl-extract-latest-asterisk.sh