From 52f0165813035a04a6e2bd2cd248f218423a1f54 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Fri, 26 Feb 2016 13:01:05 +0100 Subject: [PATCH 01/14] DEV warning --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 8bb3d199e..c905e76a4 100644 --- a/install.sh +++ b/install.sh @@ -16,6 +16,22 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. ################################################################### +echo -e "\n + This the DEVELOPMENT Version of Gemeinschaft!\n \ + Only community support.\n \ + Use allways stable version for production.\n \ + This installer might be broken. + If you agree please type 'yes'.\n" +read answer + +case $answer in + yes) + ;; + *) + echo "Good bye"; + exit 0; + ;; +esac GEMEINSCHAFT_VERS="develop" From c80d97f3d70cfa371dacf7fe2f473fe46c7c1a76 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 2 Mar 2016 00:36:06 +0100 Subject: [PATCH 02/14] Snom Bug --- opt/gemeinschaft/htdocs/prov/snom/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/gemeinschaft/htdocs/prov/snom/settings.php b/opt/gemeinschaft/htdocs/prov/snom/settings.php index ab4681a28..1fc3f36b8 100644 --- a/opt/gemeinschaft/htdocs/prov/snom/settings.php +++ b/opt/gemeinschaft/htdocs/prov/snom/settings.php @@ -919,7 +919,7 @@ function _settings_out() psetting('dkey_directory', 'url '. $prov_url_snom .'pb.php?m=$mac&u=$user_name1'); psetting('dkey_redial' , 'url '. $prov_url_snom .'dial-log.php?user=$user_name1'); # so geht die Retrieve-Taste auch ohne neue Nachrichten: -psetting('dkey_retrieve' , 'speed voicemail'); +psetting('dkey_retrieve' , 'speed voicemail@'. $host); From ba9bfcd90bd8c3c68be814b47cd766adeffabdaf Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 2 Mar 2016 02:42:50 +0100 Subject: [PATCH 03/14] GXP2000 ringtone bug --- opt/gemeinschaft/htdocs/prov/grandstream/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opt/gemeinschaft/htdocs/prov/grandstream/settings.php b/opt/gemeinschaft/htdocs/prov/grandstream/settings.php index 5f2cd8ca6..02ce139c6 100644 --- a/opt/gemeinschaft/htdocs/prov/grandstream/settings.php +++ b/opt/gemeinschaft/htdocs/prov/grandstream/settings.php @@ -624,10 +624,10 @@ function xml_output() if (! in_array($phone_model, array('gxp2110'), true) ) { psetting('P107', ''); # Custom ringtone 3, used if incoming caller ID is: "" } -if ( in_array($phone_model, array('bt200','bt201','gxp1200','gxp2000'), true) ) { +if ( in_array($phone_model, array('bt200','bt201','gxp1200'), true) ) { psetting('P345', '3,2,7,2,0;11,1,7,2,0;60'); # System ringtone ( maxlength 64 ) } -if ( in_array($phone_model, array('gxp2010','gxp2020','gxv3000','gxv3005','gxp2110'), true) ) { +if ( in_array($phone_model, array('gxp2010','gxp2020','gxv3000','gxv3005','gxp2110','gxp2000'), true) ) { psetting('P345', 'f1=440,f2=480,c=200/400;'); # System ringtone ( maxlength 64 | default "f1=440,f2=480,c=200/400;" ) } From 1255f73f6ac33f3a2ea7f3d67718731621fbc2e3 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Fri, 4 Mar 2016 13:38:43 +0100 Subject: [PATCH 04/14] Bug: user with dot in name --- opt/gemeinschaft/scripts/gs-user-mac-addr-by-user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opt/gemeinschaft/scripts/gs-user-mac-addr-by-user b/opt/gemeinschaft/scripts/gs-user-mac-addr-by-user index 99b16c4c4..ea1ef811a 100755 --- a/opt/gemeinschaft/scripts/gs-user-mac-addr-by-user +++ b/opt/gemeinschaft/scripts/gs-user-mac-addr-by-user @@ -50,7 +50,7 @@ if (! isSet($opts['user']) echo $usage ,"\n\n"; die(1); } -if (preg_match('/[^a-z0-9\-_]/', $opts['user'])) { +if (preg_match('/[^a-z0-9\-_.]/', $opts['user'])) { echo $usage ,"\n\n"; die(1); } @@ -88,4 +88,4 @@ echo ' ip addr: ', $r['current_ip'] ,"\n"; echo "\n"; -?> \ No newline at end of file +?> From 5e0bb5aa63d7663a3e3080faaaa0ae7428c624db Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 25 May 2016 10:47:28 +0200 Subject: [PATCH 05/14] Version changes --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index c905e76a4..e1a8e5d83 100644 --- a/install.sh +++ b/install.sh @@ -17,7 +17,7 @@ # MA 02110-1301, USA. ################################################################### echo -e "\n - This the DEVELOPMENT Version of Gemeinschaft!\n \ + This an RC Version of Gemeinschaft!\n \ Only community support.\n \ Use allways stable version for production.\n \ This installer might be broken. @@ -33,7 +33,7 @@ case $answer in ;; esac -GEMEINSCHAFT_VERS="develop" +GEMEINSCHAFT_VERS="3.2_RC" #GEMEINSCHAFT_TGZ_URL_DIR="https://github.com/amooma/GS3/tarball" GEMEINSCHAFT_CLONE_URL_DIR="https://github.com/amooma/GS3.git" From ff4cefd34167e3f661514ff26ae62e279e6fc33d Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 25 May 2016 10:47:28 +0200 Subject: [PATCH 06/14] Version changes --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index c905e76a4..e06294bf3 100644 --- a/install.sh +++ b/install.sh @@ -17,7 +17,7 @@ # MA 02110-1301, USA. ################################################################### echo -e "\n - This the DEVELOPMENT Version of Gemeinschaft!\n \ + This an RC Version of Gemeinschaft!\n \ Only community support.\n \ Use allways stable version for production.\n \ This installer might be broken. @@ -33,7 +33,7 @@ case $answer in ;; esac -GEMEINSCHAFT_VERS="develop" +GEMEINSCHAFT_VERS="3.3_RC" #GEMEINSCHAFT_TGZ_URL_DIR="https://github.com/amooma/GS3/tarball" GEMEINSCHAFT_CLONE_URL_DIR="https://github.com/amooma/GS3.git" From 9912900993df21d8848d241d73299158eafecc98 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 25 May 2016 12:51:15 +0200 Subject: [PATCH 07/14] Jessie changes --- install.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index e06294bf3..e6f8f8474 100644 --- a/install.sh +++ b/install.sh @@ -94,17 +94,13 @@ if [ "`id -un`" != "root" ]; then fi fi -if ( ! cat /etc/debian_version | head -n 1 | grep '^7.' 1>>/dev/null ) \ -&& ( ! cat /etc/debian_version | head -n 1 | grep 'wheezy' 1>>/dev/null ) +if ( ! cat /etc/debian_version | head -n 1 | grep '^8.' 1>>/dev/null ) \ +&& ( ! cat /etc/debian_version | head -n 1 | grep 'jessie' 1>>/dev/null ) then if [ "$L2" == "de" ]; then - err " Ihr Debian ist nicht Version 7 (\"Wheezy\").\n" \ - " Bitte laden Sie einen Debian-Installer herunter:\n" \ - " http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-7.1.0-i386-netinst.iso" + err " Ihr Debian ist nicht Version 8 (\"Jessie\").\n" \ else - err " Your Debian is not version 7 (\"Wheezy\").\n" \ - " Please download a Debian installer from\n" \ - " http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-7.1.0-i386-netinst.iso" + err " Your Debian is not version 8 (\"Jessie\").\n" \ fi fi @@ -542,16 +538,14 @@ echo "" echo "***" echo "*** Setting up Apache web server ..." echo "***" -cd /etc/apache2/conf.d/ -ln -snf /opt/gemeinschaft-source/etc/apache2/conf.d/gemeinschaft.conf gemeinschaft.conf if [ -e /opt/gemeinschaft-source/etc/apache2/sites-available/gemeinschaft ]; then cd /etc/apache2/sites-available/ - ln -snf /opt/gemeinschaft-source/etc/apache2/sites-available/gemeinschaft gemeinschaft + ln -snf /opt/gemeinschaft-source/etc/apache2/sites-available/gemeinschaft gemeinschaft.conf a2dissite default a2ensite gemeinschaft else cd /etc/apache2/sites-available/ - cat default | sed -e 's/AllowOverride None/AllowOverride All/i' > gemeinschaft + cat default | sed -e 's/AllowOverride None/AllowOverride All/i' > gemeinschaft.conf a2dissite default a2ensite gemeinschaft fi @@ -716,7 +710,7 @@ cd /etc/apache2/ssl/ chown root:root openstage-*.pem chmod 640 openstage-*.pem cd /etc/apache2/sites-available/ -ln -snf /opt/gemeinschaft-siemens-source/doc/httpd-vhost.conf.example gemeinschaft-siemens +ln -snf /opt/gemeinschaft-siemens-source/doc/httpd-vhost.conf.example gemeinschaft-siemens.conf a2ensite gemeinschaft-siemens invoke-rc.d apache2 restart cd From be310d8e9446c11edb137c7de178b2cd98f20c9e Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 25 May 2016 12:51:15 +0200 Subject: [PATCH 08/14] Jessie changes --- install.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index e06294bf3..e6f8f8474 100644 --- a/install.sh +++ b/install.sh @@ -94,17 +94,13 @@ if [ "`id -un`" != "root" ]; then fi fi -if ( ! cat /etc/debian_version | head -n 1 | grep '^7.' 1>>/dev/null ) \ -&& ( ! cat /etc/debian_version | head -n 1 | grep 'wheezy' 1>>/dev/null ) +if ( ! cat /etc/debian_version | head -n 1 | grep '^8.' 1>>/dev/null ) \ +&& ( ! cat /etc/debian_version | head -n 1 | grep 'jessie' 1>>/dev/null ) then if [ "$L2" == "de" ]; then - err " Ihr Debian ist nicht Version 7 (\"Wheezy\").\n" \ - " Bitte laden Sie einen Debian-Installer herunter:\n" \ - " http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-7.1.0-i386-netinst.iso" + err " Ihr Debian ist nicht Version 8 (\"Jessie\").\n" \ else - err " Your Debian is not version 7 (\"Wheezy\").\n" \ - " Please download a Debian installer from\n" \ - " http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-7.1.0-i386-netinst.iso" + err " Your Debian is not version 8 (\"Jessie\").\n" \ fi fi @@ -542,16 +538,14 @@ echo "" echo "***" echo "*** Setting up Apache web server ..." echo "***" -cd /etc/apache2/conf.d/ -ln -snf /opt/gemeinschaft-source/etc/apache2/conf.d/gemeinschaft.conf gemeinschaft.conf if [ -e /opt/gemeinschaft-source/etc/apache2/sites-available/gemeinschaft ]; then cd /etc/apache2/sites-available/ - ln -snf /opt/gemeinschaft-source/etc/apache2/sites-available/gemeinschaft gemeinschaft + ln -snf /opt/gemeinschaft-source/etc/apache2/sites-available/gemeinschaft gemeinschaft.conf a2dissite default a2ensite gemeinschaft else cd /etc/apache2/sites-available/ - cat default | sed -e 's/AllowOverride None/AllowOverride All/i' > gemeinschaft + cat default | sed -e 's/AllowOverride None/AllowOverride All/i' > gemeinschaft.conf a2dissite default a2ensite gemeinschaft fi @@ -716,7 +710,7 @@ cd /etc/apache2/ssl/ chown root:root openstage-*.pem chmod 640 openstage-*.pem cd /etc/apache2/sites-available/ -ln -snf /opt/gemeinschaft-siemens-source/doc/httpd-vhost.conf.example gemeinschaft-siemens +ln -snf /opt/gemeinschaft-siemens-source/doc/httpd-vhost.conf.example gemeinschaft-siemens.conf a2ensite gemeinschaft-siemens invoke-rc.d apache2 restart cd From 66ef2e120f6d087f9670933ef49485635ae7ffa2 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Mon, 6 Jun 2016 08:51:31 +0200 Subject: [PATCH 09/14] Update install.sh update-rc.d sucks in Jessie --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3a4d4a7ae..9a853d577 100644 --- a/install.sh +++ b/install.sh @@ -1011,8 +1011,8 @@ fi if [ -e /opt/gemeinschaft-source/etc/init.d/silverbullet ]; then cd /etc/init.d/ ln -snf /opt/gemeinschaft-source/etc/init.d/silverbullet - update-rc.d silverbullet defaults 92 8 - invoke-rc.d silverbullet start + insserv /etc/init.d/silverbullet + /etc/init.d/silverbullet start fi From 0dd9700d9dc20acaa025e25e4e9a53f1f0ed1740 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Mon, 6 Jun 2016 08:59:02 +0200 Subject: [PATCH 10/14] update-rc.d still sucks --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 9a853d577..4c24f4021 100644 --- a/install.sh +++ b/install.sh @@ -753,8 +753,8 @@ ln -snf /opt/gemeinschaft-source/var/lib/gemeinschaft if [ -e /opt/gemeinschaft-source/etc/init.d/gs-sip-ua-config-responder ]; then cd /etc/init.d/ ln -snf /opt/gemeinschaft-source/etc/init.d/gs-sip-ua-config-responder - update-rc.d gs-sip-ua-config-responder defaults 92 8 - invoke-rc.d gs-sip-ua-config-responder start + insserv /etc/init.d/gs-sip-ua-config-responder + /etc/init.d/gs-sip-ua-config-responder start fi @@ -762,8 +762,8 @@ fi # if [ -e /opt/gemeinschaft-source/etc/init.d/gs-extstated ]; then ln -snf /opt/gemeinschaft-source/etc/init.d/gs-extstated /etc/init.d/gs-extstated - update-rc.d gs-extstated defaults 92 08 - invoke-rc.d gs-extstated start + insserv /etc/init.d/gs-extstated + /etc/init.d/gs-extstated start fi From 52e358e972b55c6fa909ddd1c6786698c03f5fbd Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Mon, 6 Jun 2016 17:37:47 +0200 Subject: [PATCH 11/14] systemd changes --- etc/system/faxgetty-ttyIAX0.service | 12 ++++++++++++ etc/system/faxgetty-ttyIAX1.service | 12 ++++++++++++ install.sh | 19 ++++--------------- 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 etc/system/faxgetty-ttyIAX0.service create mode 100644 etc/system/faxgetty-ttyIAX1.service diff --git a/etc/system/faxgetty-ttyIAX0.service b/etc/system/faxgetty-ttyIAX0.service new file mode 100644 index 000000000..436eabb40 --- /dev/null +++ b/etc/system/faxgetty-ttyIAX0.service @@ -0,0 +1,12 @@ +[Unit] +Description=HylaFAX faxgetty for ttyIAX0 + +[Service] +User=root +Group=root +Restart=always +RestartSec=30 +ExecStart=/usr/sbin/faxgetty /dev/ttyIAX0 + +[Install] +WantedBy=multi-user.target diff --git a/etc/system/faxgetty-ttyIAX1.service b/etc/system/faxgetty-ttyIAX1.service new file mode 100644 index 000000000..072462488 --- /dev/null +++ b/etc/system/faxgetty-ttyIAX1.service @@ -0,0 +1,12 @@ +[Unit] +Description=HylaFAX faxgetty for ttyIAX1 + +[Service] +User=root +Group=root +Restart=always +RestartSec=30 +ExecStart=/usr/sbin/faxgetty /dev/ttyIAX1 + +[Install] +WantedBy=multi-user.target diff --git a/install.sh b/install.sh index 4c24f4021..73658ec17 100644 --- a/install.sh +++ b/install.sh @@ -837,23 +837,12 @@ cp "${HF_CONF_SRC}/ttyIAX0" /etc/iaxmodem/ttyIAX0 cp "${HF_CONF_SRC}/ttyIAX1" /etc/iaxmodem/ttyIAX1 # add iaxmodem entries to iax.conf -# -#cat "${HF_CONF_SRC}/iax.conf.template" >> /etc/asterisk/iax.conf - -# add faxgetty entries to inittab -# //FIXME? - set USE_FAXGETTY=yes or USE_FAXGETTY=init in -# /etc/default/hylafax instead? -# -echo "" >> /etc/inittab -echo "# HylaFax getty" >> /etc/inittab -echo "mo00:23:respawn:/usr/sbin/faxgetty ttyIAX0" >> /etc/inittab -echo "mo01:23:respawn:/usr/sbin/faxgetty ttyIAX1" >> /etc/inittab -# adding these lines to /etc/inittab makes /etc/default/hylafax -# default to USE_FAXGETTY=init instead of USE_FAXGETTY=yes -# make init reload /etc/inittab -/sbin/init q +ln -s /opt/gemeinschaft-source/etc/systemd/system/faxgetty-ttyIAX0.service /etc/systemd/system/ +ln -s /opt/gemeinschaft-source/etc/systemd/system/faxgetty-ttyIAX1.service /etc/systemd/system/ +systemctl start faxgetty-ttyIAX0.service +systemctl start faxgetty-ttyIAX1.service echo "" echo "***" From 3641c3877688be38e2f955c731ba776974a93cb5 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Tue, 7 Jun 2016 14:44:48 +0200 Subject: [PATCH 12/14] wrong path --- etc/{ => systemd}/system/faxgetty-ttyIAX0.service | 0 etc/{ => systemd}/system/faxgetty-ttyIAX1.service | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename etc/{ => systemd}/system/faxgetty-ttyIAX0.service (100%) rename etc/{ => systemd}/system/faxgetty-ttyIAX1.service (100%) diff --git a/etc/system/faxgetty-ttyIAX0.service b/etc/systemd/system/faxgetty-ttyIAX0.service similarity index 100% rename from etc/system/faxgetty-ttyIAX0.service rename to etc/systemd/system/faxgetty-ttyIAX0.service diff --git a/etc/system/faxgetty-ttyIAX1.service b/etc/systemd/system/faxgetty-ttyIAX1.service similarity index 100% rename from etc/system/faxgetty-ttyIAX1.service rename to etc/systemd/system/faxgetty-ttyIAX1.service From e2afe186c2cdb8a6fedfcdd3bb1dbd3c1098b3ba Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Thu, 8 Dec 2016 09:54:18 +0100 Subject: [PATCH 13/14] Asterisk 13 --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 73658ec17..a84b9ad2f 100644 --- a/install.sh +++ b/install.sh @@ -33,7 +33,7 @@ case $answer in ;; esac -GEMEINSCHAFT_VERS="3.3_RC" +GEMEINSCHAFT_VERS="3.3-ast-13" #GEMEINSCHAFT_TGZ_URL_DIR="https://github.com/amooma/GS3/tarball" GEMEINSCHAFT_CLONE_URL_DIR="https://github.com/amooma/GS3.git" @@ -320,9 +320,9 @@ make config dahdi_genconf || true cd /usr/local/src/ -$DOWNLOAD "http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz" -tar -xvzf asterisk-1.8-current.tar.gz -cd $(tar -tzf asterisk-1.8-current.tar.gz | head -n 1 | cut -d '/' -f1) +$DOWNLOAD "http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz" +tar -xvzf asterisk-13-current.tar.gz +cd $(tar -tzf asterisk-13-current.tar.gz | head -n 1 | cut -d '/' -f1) ./configure make menuselect.makeopts menuselect/menuselect --enable res_config_mysql menuselect.makeopts From 8ee4f4267c9977526cc4889c21060fbd98c3d6b3 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 3 Apr 2019 10:28:01 +0200 Subject: [PATCH 14/14] New DEV branch for 3.4 on Debian Stretch --- install.sh | 142 ++++++++++++++++++----------------------------------- 1 file changed, 49 insertions(+), 93 deletions(-) diff --git a/install.sh b/install.sh index a84b9ad2f..8139a26fa 100644 --- a/install.sh +++ b/install.sh @@ -17,10 +17,11 @@ # MA 02110-1301, USA. ################################################################### echo -e "\n - This an RC Version of Gemeinschaft!\n \ - Only community support.\n \ + This a pure DEVELOPMENT Version of Gemeinschaft!\n \ Use allways stable version for production.\n \ - This installer might be broken. + This script will install a DEVELOPMENT system, \n \ + it will most likely exit with an error.\n \ + ONLY USE FOR DEVELOPMENT.\ \ If you agree please type 'yes'.\n" read answer @@ -33,7 +34,7 @@ case $answer in ;; esac -GEMEINSCHAFT_VERS="3.3-ast-13" +GEMEINSCHAFT_VERS="3.4-dev" #GEMEINSCHAFT_TGZ_URL_DIR="https://github.com/amooma/GS3/tarball" GEMEINSCHAFT_CLONE_URL_DIR="https://github.com/amooma/GS3.git" @@ -94,15 +95,15 @@ if [ "`id -un`" != "root" ]; then fi fi -if ( ! cat /etc/debian_version | head -n 1 | grep '^8.' 1>>/dev/null ) \ -&& ( ! cat /etc/debian_version | head -n 1 | grep 'jessie' 1>>/dev/null ) -then - if [ "$L2" == "de" ]; then - err " Ihr Debian ist nicht Version 8 (\"Jessie\").\n" - else - err " Your Debian is not version 8 (\"Jessie\").\n" - fi -fi +#if ( ! cat /etc/debian_version | head -n 1 | grep '^8.' 1>>/dev/null ) \ +#&& ( ! cat /etc/debian_version | head -n 1 | grep 'jessie' 1>>/dev/null ) +#then +# if [ "$L2" == "de" ]; then +# err " Ihr Debian ist nicht Version 8 (\"Jessie\").\n" +# else +# err " Your Debian is not version 8 (\"Jessie\").\n" +# fi +#fi # set PATH @@ -202,7 +203,6 @@ ${APTITUDE_INSTALL} dnsutils # echo "Checking Internet access ..." while ! ( wget -O - -T 30 --spider http://ftp.debian.org/ >>/dev/null ); do sleep 5; done -MY_MAC_ADDR=`LANG=C ifconfig | grep -oE '[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}' | head -n 1` # install basic stuff @@ -215,40 +215,13 @@ ${APTITUDE_INSTALL} \ coreutils lsb-base grep findutils sudo wget curl cron \ expect dialog logrotate hostname net-tools ifupdown iputils-ping netcat \ udev psmisc dnsutils iputils-arping pciutils bzip2 \ - console-data console-tools \ + console-data net-tools\ vim less git linux-headers-$(uname -r) \ gcc make gcc make ncurses-dev zlib1g-dev \ g++ libxml2-dev doxygen libmysql++-dev libcrypto++-dev libssl-dev \ - libportaudio2 portaudio19-dev libasound-dev - -# now that we have vim, enable syntax highlighting by default: -if ( which vim 1>>/dev/null 2>>/dev/null ); then - sed -i -r -e 's/^"(syntax) on/\1 on/' /etc/vim/vimrc || true -fi - -# set EDITOR to "vim" -if ( which vim 1>>/dev/null 2>>/dev/null ); then - echo "" >> /root/.bashrc || true - echo "export EDITOR=\"vim\"" >> /root/.bashrc || true - echo "" >> /root/.bashrc || true - #if [ "x${SHELL}" = "x/bin/bash" ]; then - # source /root/.bashrc - #fi -fi - -# and add ls colors and some useful bash aliases: -cat <<\HEREDOC >> /root/.bashrc - -export LS_OPTIONS='--color=auto' -eval "`dircolors`" -alias ls='ls $LS_OPTIONS' -alias l='ls $LS_OPTIONS -lF' -alias ll='ls $LS_OPTIONS -lFA' - -HEREDOC -#if [ "x${SHELL}" = "x/bin/bash" ]; then -# source /root/.bashrc -#fi + libportaudio2 portaudio19-dev libasound-dev libjansson-dev patch \ + mysql-client mysql-server insserv\ + libedit-dev unixodbc unixodbc-bin unixodbc-dev libsqlite3-dev WGET="wget" WGET_ARGS="-c -T 60 --no-check-certificate" @@ -257,27 +230,27 @@ DOWNLOAD="${WGET} ${WGET_ARGS}" # set up lang enviroment # -echo "" -echo "***" -echo "*** Setting up language environment ..." -echo "***" -if ( ! which locale-gen 1>>/dev/null 2>>/dev/null ); then - ${APTITUDE_INSTALL} locales -elif [ ! -e /usr/share/i18n/locales/. ]; then - ${APTITUDE_INSTALL} locales -elif [ ! -e /usr/share/locale/. ]; then - ${APTITUDE_INSTALL} locales -fi -if [ -e /etc/locale.gen ]; then - grep -e "^de_DE\.UTF-8 UTF-8" /etc/locale.gen || echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen - grep -e "^en_US\.UTF-8 UTF-8" /etc/locale.gen || echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen -fi -if ( type locale-gen 2>>/dev/null ); then - locale-gen -else - echo "WARNING: locale-gen not found!" >&2 -fi - +#echo "" +#echo "***" +#echo "*** Setting up language environment ..." +#echo "***" +#if ( ! which locale-gen 1>>/dev/null 2>>/dev/null ); then +# ${APTITUDE_INSTALL} locales +#elif [ ! -e /usr/share/i18n/locales/. ]; then +# ${APTITUDE_INSTALL} locales +#elif [ ! -e /usr/share/locale/. ]; then +# ${APTITUDE_INSTALL} locales +#fi +#if [ -e /etc/locale.gen ]; then +# grep -e "^de_DE\.UTF-8 UTF-8" /etc/locale.gen || echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen +# grep -e "^en_US\.UTF-8 UTF-8" /etc/locale.gen || echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +#fi +#if ( type locale-gen 2>>/dev/null ); then +# locale-gen +#else +# echo "WARNING: locale-gen not found!" >&2 +#fi +# # install ntp # @@ -320,13 +293,13 @@ make config dahdi_genconf || true cd /usr/local/src/ -$DOWNLOAD "http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz" -tar -xvzf asterisk-13-current.tar.gz -cd $(tar -tzf asterisk-13-current.tar.gz | head -n 1 | cut -d '/' -f1) -./configure -make menuselect.makeopts -menuselect/menuselect --enable res_config_mysql menuselect.makeopts -menuselect/menuselect --enable cdr_mysql menuselect.makeopts +$DOWNLOAD "http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz" +tar -xvzf asterisk-16-current.tar.gz +cd $(tar -tzf asterisk-16-current.tar.gz | head -n 1 | cut -d '/' -f1) +./configure --with-jansson-bundled +#make menuselect.makeopts +#menuselect/menuselect --enable res_config_mysql menuselect.makeopts +#menuselect/menuselect --enable cdr_mysql menuselect.makeopts make make install make samples @@ -362,21 +335,6 @@ echo "asterisk ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/gemeinschaft-asterisk chmod 0440 /etc/sudoers.d/gemeinschaft-asterisk -# install lame -# -if ( ! which lame 1>>/dev/null 2>>/dev/null ); then - echo "" - echo "***" - echo "*** Installing Lame ..." - echo "***" - echo 'deb http://deb-multimedia.org wheezy main non-free' \ - > /etc/apt/sources.list.d/debian-multimedia.list - aptitude update --allow-untrusted || true - ${APTITUDE_INSTALL} --allow-untrusted debian-multimedia-keyring || true - #${APTITUDE_INSTALL} lame || true - ${APTITUDE_INSTALL} --allow-untrusted lame || true -fi - # install misc packages # @@ -389,12 +347,11 @@ export DEBIAN_PRIORITY=critical ${APTITUDE_INSTALL} \ perl perl-modules libnet-daemon-perl libnet-netmask-perl libio-interface-perl libio-socket-multicast-perl \ sipsak \ - mysql-client mysql-server \ apache2 \ - php5-cli libapache2-mod-php5 php5-mysql php5-ldap \ - python2.6 \ + php-cli libapache2-mod-php php-mysql php-ldap \ + python \ python-mysqldb \ - sox libsox-fmt-all mpg123 + sox libsox-fmt-all mpg123 lame unset DEBIAN_FRONTEND unset DEBIAN_PRIORITY #aptitude clean @@ -552,7 +509,6 @@ fi a2enmod rewrite a2enmod alias a2enmod mime -a2enmod php5 a2enmod headers || true