#!/bin/sh # /usr/share/live-helper/hooks/stripped - hook list for live-helper(7) # Copyright (C) 2006-2008 Daniel Baumann # # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. set -e # Check if build Voyage ONE. If not, exit if [ $(dpkg-query --show | cut -f1 | grep "^olsrd$" | wc -l) -eq 0 ] ; then exit 0 fi echo "($0) Building Voyage ONE. " KERNEL_VER=2.6.30-voyage MODULE_IMAGE="batman-adv-modules-$KERNEL_VER batmand-gateway-modules-$KERNEL_VER dahdi-modules-$KERNEL_VER lirc-modules-$KERNEL_VER" #MODULE_IMAGE="dahdi-modules-$KERNEL_VER lirc-modules-$KERNEL_VER" #KERNEL_IMAGE=linux-image-"$KERNEL_VER" for IMAGE in $MODULE_IMAGE; do apt-get --yes --force-yes install "$IMAGE" done ## # Asterisk configuration ## # A temporary hook to fix permissions in the package asterisk. # Fixes will be later moved to the package asterisk itself. chmod g+w /var/lib/asterisk # change permission chown -R asterisk:asterisk /etc/asterisk/* chown -R asterisk:asterisk /var/log/asterisk #chown -R asterisk:asterisk /var/run/asterisk chown -R asterisk:asterisk /var/spool/asterisk chown -R asterisk:asterisk /usr/share/asterisk/static-http/* chown -R asterisk:asterisk /usr/share/asterisk/scripts/* ## /etc/asterisk/http.conf sed -i \ -e '/^;enabled\>/s/^;//' \ -e '/^;enablestatic\>/s/^;//' \ -e '/^;redirect\>/s/^;//' \ /etc/asterisk/http.conf cat <>/etc/asterisk/http.conf bindaddr=0.0.0.0 bindport=8088 EOF ## /etc/asterisk/manager.conf cat <>/etc/asterisk/manager.conf webenabled = yes [admin] secret = voyage read = system,call,log,verbose,command,agent,config write = system,call,log,verbose,command,agent,config,originate EOF # Meet Me Conference cat <>/etc/asterisk/meetme.conf conf = 6300,, EOF # Music on Hold sed -i -e "s/directory=moh/directory=\/usr\/share\/asterisk\/moh\//" /etc/asterisk/musiconhold.conf # Sanity check: sh /usr/share/asterisk/scripts/checkconfig # # Update /etc/default/voyage-util echo "VOYAGE_SYNC_DIRS=\"\$VOYAGE_SYNC_DIRS etc/asterisk var/lib/asterisk var/spool/asterisk var/lib/nfs\"" >> /etc/default/voyage-util # # Update /etc/default/lcr # if [ -f /etc/default/lcr ] ; then echo "RUNLCR=yes" >> /etc/default/lcr fi if [ -f /etc/lcr/options.conf ] ; then echo "socketrights 0700" >> /etc/lcr/options.conf echo "socketuser asterisk" >> /etc/lcr/options.conf echo "socketgroup asterisk" >> /etc/lcr/options.conf fi # # Update /etc/modules # echo "mISDN_core" >> /etc/modules echo "mISDN_dsp" >> /etc/modules # # Change logo for asterisk-gui # cp /usr/share/voyage-artworks/digiumlogo.gif \ /usr/share/voyage-artworks/panel.png \ /usr/share/voyage-artworks/favicon.ico \ /usr/share/asterisk/static-http/config/images/ cp /usr/share/voyage-artworks/digiumlogo.gif \ /usr/share/asterisk/static-http/config/setup/ #