diff --git a/debian/install.sh b/debian/install.sh index 2b6ca2e..008ac32 100755 --- a/debian/install.sh +++ b/debian/install.sh @@ -6,41 +6,41 @@ cd "$(dirname "$0")" . ./resources/colors.sh . ./resources/arguments.sh -if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then +if [ .$CPU_CHECK = .true ] && [ .$USE_SWITCH_SOURCE = .false ]; then #check what the CPU and OS are OS_test=$(uname -m) CPU_arch='unknown' OS_bits='unknown' CPU_bits='unknown' - if [ $OS_test = 'armv7l' ]; then + if [ .$OS_test = .'armv7l' ]; then OS_bits='32' CPU_bits='32' # RaspberryPi 3 is actually armv8l but current Raspbian reports the cpu as armv7l and no Raspbian 64Bit has been released at this time CPU_arch='arm' - elif [ $OS_test = 'armv8l' ]; then + elif [ .$OS_test = .'armv8l' ]; then # We currently have no test case for armv8l OS_bits='unknown' CPU_bits='64' CPU_arch='arm' - elif [ $OS_test = 'i386' ]; then + elif [ .$OS_test = .'i386' ]; then OS_bits='32' - if [ "$(grep -o -w 'lm' /proc/cpuinfo)" = 'lm' ]; then + if [ .$(grep -o -w 'lm' /proc/cpuinfo | head -n 1) = .'lm' ]; then CPU_bits='64' else CPU_bits='32' fi CPU_arch='x86' - elif [ $OS_test = 'i686' ]; then + elif [ .$OS_test = .'i686' ]; then OS_bits='32' - if [ $(grep -o -w 'lm' /proc/cpuinfo) = 'lm' ]; then + if [ .$(grep -o -w 'lm' /proc/cpuinfo | head -n 1) = .'lm' ]; then CPU_bits='64' else CPU_bits='32' fi CPU_arch='x86' - elif [ $OS_test = 'x86_64' ]; then + elif [ .$OS_test = .'x86_64' ]; then OS_bits='64' - if [ $(grep -o -w 'lm' /proc/cpuinfo) = 'lm' ]; then + if [ .$(grep -o -w 'lm' /proc/cpuinfo | head -n 1) = .'lm' ]; then CPU_bits='64' else CPU_bits='32' @@ -48,11 +48,11 @@ if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then CPU_arch='x86' fi - if [ $CPU_arch = 'arm' ]; then - if [ $OS_bits = '32' ]; then + if [ .$CPU_arch = .'arm' ]; then + if [ .$OS_bits = .'32' ]; then export USE_SWITCH_PACKAGE_UNOFFICIAL_ARM=true verbose "Correct CPU/OS detected, using unofficial arm repo" - elif [ $OS_bits = '64' ]; then + elif [ .$OS_bits = .'64' ]; then error "You are using a 64bit arm OS this is unsupported" warning " please rerun with --use-switch-source" exit 3 @@ -61,15 +61,15 @@ if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then warning " please rerun with --use-switch-source" exit 3 fi - elif [ $CPU_arch = 'x86' ]; then - if [ $OS_bits = '32' ]; then + elif [ .$CPU_arch = .'x86' ]; then + if [ .$OS_bits = .'32' ]; then error "You are using a 32bit OS this is unsupported" - if [ $CPU_bits = '64' ]; then + if [ .$CPU_bits = .'64' ]; then warning " Your CPU is 64bit you should consider reinstalling with a 64bit OS" fi warning " please rerun with --use-switch-source" exit 3 - elif [ $OS_bits = '64' ]; then + elif [ .$OS_bits = .'64' ]; then verbose "Correct CPU/OS detected" else error "Unknown OS_bits $OS_bits this is unsupported" @@ -86,7 +86,7 @@ sed -i '/cdrom:/d' /etc/apt/sources.list #Update Debian verbose "Update Debian" -apt-get upgrade && apt-get update -y --force-yes +apt-get upgrade && apt-get update -y #IPTables resources/iptables.sh @@ -104,8 +104,8 @@ resources/php.sh resources/fail2ban.sh #FreeSWITCH -if [ $USE_SWITCH_SOURCE = true ]; then - if [ $USE_SWITCH_MASTER = true ]; then +if [ .$USE_SWITCH_SOURCE = .true ]; then + if [ .$USE_SWITCH_MASTER = .true ]; then resources/switch/source-master.sh else resources/switch/source-release.sh @@ -121,14 +121,14 @@ if [ $USE_SWITCH_SOURCE = true ]; then resources/switch/source-systemd.sh else - if [ $USE_SWITCH_MASTER = true ]; then - if [ $USE_SWITCH_PACKAGE_ALL = true ]; then + if [ .$USE_SWITCH_MASTER = .true ]; then + if [ .$USE_SWITCH_PACKAGE_ALL = .true ]; then resources/switch/package-master-all.sh else resources/switch/package-master.sh fi else - if [ $USE_SWITCH_PACKAGE_ALL = true ]; then + if [ .$USE_SWITCH_PACKAGE_ALL = .true ]; then resources/switch/package-all.sh else resources/switch/package-release.sh diff --git a/debian/resources/arguments.sh b/debian/resources/arguments.sh index ac8333e..fbcac06 100755 --- a/debian/resources/arguments.sh +++ b/debian/resources/arguments.sh @@ -31,7 +31,7 @@ if [ -z "$CPU_CHECK" ]; then esac done - if [ $HELP = true ]; then + if [ .$HELP = .true ]; then warning "Debian installer script" warning " --use-switch-source will use freeswitch from source rather than ${green}(default:packages)" warning " --use-switch-package-all if using packages use the meta-all package" diff --git a/debian/resources/fail2ban.sh b/debian/resources/fail2ban.sh index e1b31a5..465abe9 100755 --- a/debian/resources/fail2ban.sh +++ b/debian/resources/fail2ban.sh @@ -10,7 +10,7 @@ cd "$(dirname "$0")" verbose "Installing Fail2ban" #add the dependencies -apt-get install -y --force-yes fail2ban +apt-get install -y fail2ban #move the filters cp fail2ban/freeswitch-dos.conf /etc/fail2ban/filter.d/freeswitch-dos.conf @@ -23,7 +23,7 @@ cp fail2ban/nginx-dos.conf /etc/fail2ban/filter.d/nginx-dos.conf cp fail2ban/jail.local /etc/fail2ban/jail.local #update config if source is being used -if [ $USE_FREESWITCH_SOURCE = true ]; then +if [ .$USE_FREESWITCH_SOURCE = .true ]; then sed 's#var/log/freeswitch#usr/local/freeswitch/log#g' -i /etc/fail2ban/jail.local fi diff --git a/debian/resources/fusionpbx.sh b/debian/resources/fusionpbx.sh index ef14f6a..44b1738 100755 --- a/debian/resources/fusionpbx.sh +++ b/debian/resources/fusionpbx.sh @@ -10,10 +10,10 @@ cd "$(dirname "$0")" verbose "Installing FusionPBX" #install dependencies -apt-get install -y --force-yes vim git dbus haveged ssl-cert -apt-get install -y --force-yes ghostscript libtiff5-dev libtiff-tools +apt-get install -y vim git dbus haveged ssl-cert +apt-get install -y ghostscript libtiff5-dev libtiff-tools -if [ $USE_SYSTEM_MASTER = true ]; then +if [ .$USE_SYSTEM_MASTER = .true ]; then verbose "Using master" BRANCH="" else diff --git a/debian/resources/iptables.sh b/debian/resources/iptables.sh index 188e024..81bac9a 100755 --- a/debian/resources/iptables.sh +++ b/debian/resources/iptables.sh @@ -41,4 +41,4 @@ iptables -P OUTPUT ACCEPT #answer the questions for iptables persistent echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections -apt-get install -y --force-yes iptables-persistent +apt-get install -y iptables-persistent diff --git a/debian/resources/nginx.sh b/debian/resources/nginx.sh index 96a060c..9cda561 100755 --- a/debian/resources/nginx.sh +++ b/debian/resources/nginx.sh @@ -10,7 +10,7 @@ cd "$(dirname "$0")" verbose "Installing the web server" #install dependencies -apt-get install -y --force-yes nginx php5 php5-cli php5-fpm php5-pgsql php5-sqlite php5-odbc php5-curl php5-imap php5-mcrypt +apt-get install -y nginx php5 php5-cli php5-fpm php5-pgsql php5-sqlite php5-odbc php5-curl php5-imap php5-mcrypt #enable fusionpbx nginx config cp nginx/fusionpbx /etc/nginx/sites-available/fusionpbx diff --git a/debian/resources/postgres.sh b/debian/resources/postgres.sh index e20fa33..efebddb 100755 --- a/debian/resources/postgres.sh +++ b/debian/resources/postgres.sh @@ -10,13 +10,13 @@ password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64) echo "Install PostgreSQL and create the database and users\n" #included in the distribution -#apt-get install -y --force-yes sudo postgresql +#apt-get install -y sudo postgresql #postgres official repository echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' >> /etc/apt/sources.list.d/pgdg.list wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - apt-get update && apt-get upgrade -y -apt-get install -y --force-yes sudo postgresql +apt-get install -y sudo postgresql #Add PostgreSQL and BDR REPO #echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' >> /etc/apt/sources.list.d/postgresql.list @@ -24,7 +24,7 @@ apt-get install -y --force-yes sudo postgresql #/usr/bin/wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - #/usr/bin/wget --quiet -O - http://packages.2ndquadrant.com/bdr/apt/AA7A6805.asc | apt-key add - #apt-get update && apt-get upgrade -y -#apt-get install -y --force-yes sudo postgresql-bdr-9.4 postgresql-bdr-9.4-bdr-plugin postgresql-bdr-contrib-9.4 +#apt-get install -y sudo postgresql-bdr-9.4 postgresql-bdr-9.4-bdr-plugin postgresql-bdr-contrib-9.4 #systemd systemctl daemon-reload diff --git a/debian/resources/reboot_phones.sh b/debian/resources/reboot_phones.sh index 725690e..17e6611 100644 --- a/debian/resources/reboot_phones.sh +++ b/debian/resources/reboot_phones.sh @@ -24,7 +24,7 @@ INPUT=$FILE #Loop through the registrations and reboot [ ! -f $INPUT ] &while read reg_user realm extra do - if [ "$realm" = "$domain" ]; then + if [ ."$realm" = ."$domain" ]; then eval 'fs_cli -x "luarun app.lua event_notify internal reboot $reg_user@$realm $vendor"' if [ "$pausetime" > 0 ]; then sleep $pausetime diff --git a/debian/resources/switch/package-all.sh b/debian/resources/switch/package-all.sh index a21042b..e887a48 100755 --- a/debian/resources/switch/package-all.sh +++ b/debian/resources/switch/package-all.sh @@ -3,16 +3,16 @@ #initialize variable encase we are called directly [ -z $USE_SWITCH_PACKAGE_UNOFFICIAL_ARM ] && USE_SWITCH_PACKAGE_UNOFFICIAL_ARM=false -apt-get update && apt-get install -y --force-yes ntp curl memcached haveged +apt-get update && apt-get install -y ntp curl memcached haveged arch=$(uname -m) -if [ $arch = 'armv7l' ] && [ $USE_SWITCH_PACKAGE_UNOFFICIAL_ARM = true ]; then +if [ .$arch = .'armv7l' ] && [ .$USE_SWITCH_PACKAGE_UNOFFICIAL_ARM = .true ]; then echo "deb http://repo.sip247.com/debian/freeswitch-stable-armhf/ jessie main" > /etc/apt/sources.list.d/freeswitch.list curl http://repo.sip247.com/debian/sip247.com.gpg.key | apt-key add - else echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list curl http://files.freeswitch.org/repo/deb/freeswitch-1.6/key.gpg | apt-key add - fi -apt-get update && apt-get install -y --force-yes freeswitch-meta-all freeswitch-all-dbg gdb +apt-get update && apt-get install -y freeswitch-meta-all freeswitch-all-dbg gdb #make sure that postgresql is started before starting freeswitch sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' diff --git a/debian/resources/switch/package-master-all.sh b/debian/resources/switch/package-master-all.sh index 667bfff..bfc2320 100755 --- a/debian/resources/switch/package-master-all.sh +++ b/debian/resources/switch/package-master-all.sh @@ -1,9 +1,9 @@ #!/bin/sh -apt-get update && apt-get install -y --force-yes ntp curl memcached haveged +apt-get update && apt-get install -y ntp curl memcached haveged curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >> /etc/apt/sources.list.d/freeswitch.list -apt-get update && apt-get install -y --force-yes freeswitch-meta-all freeswitch-all-dbg gdb +apt-get update && apt-get install -y freeswitch-meta-all freeswitch-all-dbg gdb #make sure that postgresql is started before starting freeswitch sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' diff --git a/debian/resources/switch/package-master.sh b/debian/resources/switch/package-master.sh index 45efd54..4ddb3ee 100755 --- a/debian/resources/switch/package-master.sh +++ b/debian/resources/switch/package-master.sh @@ -1,20 +1,20 @@ #!/bin/sh -apt-get update && apt-get install -y --force-yes curl memcached haveged +apt-get update && apt-get install -y curl memcached haveged curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >> /etc/apt/sources.list.d/freeswitch.list apt-get update -apt-get install -y --force-yes ntp gdb -apt-get install -y --force-yes freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor -apt-get install -y --force-yes freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie -apt-get install -y --force-yes freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback -apt-get install -y --force-yes freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi -apt-get install -y --force-yes freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg -apt-get install -y --force-yes freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say -apt-get install -y --force-yes freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout -apt-get install -y --force-yes freeswitch-mod-skypopen freeswitch-mod-skypopen-dbg freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache -apt-get install -y --force-yes freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite -apt-get install -y --force-yes freeswitch-music-default +apt-get install -y ntp gdb +apt-get install -y freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor +apt-get install -y freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie +apt-get install -y freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback +apt-get install -y freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi +apt-get install -y freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg +apt-get install -y freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say +apt-get install -y freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout +apt-get install -y freeswitch-mod-skypopen freeswitch-mod-skypopen-dbg freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache +apt-get install -y freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite +apt-get install -y freeswitch-music-default #make sure that postgresql is started before starting freeswitch sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' @@ -22,7 +22,7 @@ sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.tar #remove the music package to protect music on hold from package updates mkdir -p /usr/share/freeswitch/sounds/temp mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp -apt-get remove -y --force-yes freeswitch-music-default +apt-get remove -y freeswitch-music-default mkdir -p /usr/share/freeswitch/sounds/music/default mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default rm -R /usr/share/freeswitch/sounds/temp diff --git a/debian/resources/switch/package-release.sh b/debian/resources/switch/package-release.sh index 11861e8..ac6a845 100755 --- a/debian/resources/switch/package-release.sh +++ b/debian/resources/switch/package-release.sh @@ -6,9 +6,9 @@ cd "$(dirname "$0")" . ../colors.sh . ../arguments.sh -apt-get update && apt-get install -y --force-yes curl memcached haveged +apt-get update && apt-get install -y curl memcached haveged arch=$(uname -m) -if [ $arch = 'armv7l' ] && [ $USE_SWITCH_PACKAGE_UNOFFICIAL_ARM = true ]; then +if [ .$arch = .'armv7l' ] && [ .$USE_SWITCH_PACKAGE_UNOFFICIAL_ARM = .true ]; then echo "deb http://repo.sip247.com/debian/freeswitch-stable-armhf/ jessie main" > /etc/apt/sources.list.d/freeswitch.list curl http://repo.sip247.com/debian/sip247.com.gpg.key | apt-key add - else @@ -16,17 +16,17 @@ else curl http://files.freeswitch.org/repo/deb/freeswitch-1.6/key.gpg | apt-key add - fi apt-get update -apt-get install -y --force-yes gdb ntp -apt-get install -y --force-yes freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor -apt-get install -y --force-yes freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie -apt-get install -y --force-yes freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback -apt-get install -y --force-yes freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi -apt-get install -y --force-yes freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg -apt-get install -y --force-yes freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say -apt-get install -y --force-yes freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout -apt-get install -y --force-yes freeswitch-mod-skypopen freeswitch-mod-skypopen-dbg freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache -apt-get install -y --force-yes freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite -apt-get install -y --force-yes freeswitch-music-default +apt-get install -y gdb ntp +apt-get install -y freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor +apt-get install -y freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie +apt-get install -y freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback +apt-get install -y freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi +apt-get install -y freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg +apt-get install -y freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say +apt-get install -y freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout +apt-get install -y freeswitch-mod-skypopen freeswitch-mod-skypopen-dbg freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache +apt-get install -y freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite +apt-get install -y freeswitch-music-default #make sure that postgresql is started before starting freeswitch sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' @@ -34,7 +34,7 @@ sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.tar #remove the music package to protect music on hold from package updates mkdir -p /usr/share/freeswitch/sounds/temp mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp -apt-get remove -y --force-yes freeswitch-music-default +apt-get remove -y freeswitch-music-default mkdir -p /usr/share/freeswitch/sounds/music/default mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default rm -R /usr/share/freeswitch/sounds/temp diff --git a/debian/resources/switch/package-systemd.sh b/debian/resources/switch/package-systemd.sh index c252597..c91fab2 100755 --- a/debian/resources/switch/package-systemd.sh +++ b/debian/resources/switch/package-systemd.sh @@ -1,4 +1,4 @@ -apt-get remove -y --force-yes freeswitch-systemd +apt-get remove -y freeswitch-systemd cp "$(dirname $0)/source/freeswitch.service.package" /lib/systemd/system/freeswitch.service cp "$(dirname $0)/source/etc.default.freeswitch" /etc/default/freeswitch chmod 644 /lib/systemd/system/freeswitch.service diff --git a/debian/resources/switch/source-master.sh b/debian/resources/switch/source-master.sh index d194246..107af16 100755 --- a/debian/resources/switch/source-master.sh +++ b/debian/resources/switch/source-master.sh @@ -1,14 +1,14 @@ #!/bin/sh echo "Installing the FreeSWITCH source" -DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev -apt-get install -y --force-yes unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev +DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev +apt-get install -y unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev -apt-get update && apt-get install -y --force-yes ntp curl haveged +apt-get update && apt-get install -y ntp curl haveged curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" > /etc/apt/sources.list.d/freeswitch.list apt-get update && apt-get upgrade -apt-get install -y --force-yes freeswitch-video-deps-most +apt-get install -y freeswitch-video-deps-most git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch cd /usr/src/freeswitch diff --git a/debian/resources/switch/source-release.sh b/debian/resources/switch/source-release.sh index 82891ca..2acae70 100755 --- a/debian/resources/switch/source-release.sh +++ b/debian/resources/switch/source-release.sh @@ -1,13 +1,13 @@ #!/bin/sh echo "Installing the FreeSWITCH source" -DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev -apt-get install -y --force-yes ntp unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev +DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev +apt-get install -y ntp unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev -apt-get update && apt-get install -y --force-yes curl haveged +apt-get update && apt-get install -y curl haveged curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list apt-get update && apt-get upgrade -apt-get install -y --force-yes freeswitch-video-deps-most +apt-get install -y freeswitch-video-deps-most #we are about to move out of the executing directory so we need to preserve it to return after we are done CWD=$(pwd)