Changeset 8036

Show
Ignore:
Timestamp:
12/01/11 23:14:14 (18 months ago)
Author:
iordan
Message:

1) Added sounds needed for authentication app.
2) Added license and attribution for sounds
3) Added linking sounds into the asterisk sounds directory.

Location:
luci/trunk/applications/luci-pbx
Files:
5 added
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/applications/luci-pbx/root/etc/init.d/pbx-asterisk

    r7979 r8036  
    3232ASTDIRSRECURSIVE="/var/run/asterisk /var/log/asterisk /var/spool/asterisk" 
    3333ASTDIRS="/usr/lib/asterisk" 
     34ASTSOUNDSDIR="/usr/lib/asterisk/sounds" 
    3435 
    3536TEMPLATEDIR=/etc/${MODULENAME}-asterisk 
     37PBXSOUNDSDIR=$TEMPLATEDIR/sounds 
    3638VMTEMPLATEDIR=/etc/${MODULENAME}-voicemail 
     39VMSOUNDSDIR=$VMTEMPLATEDIR/sounds 
    3740ASTERISKDIR=/etc/asterisk 
    3841WORKDIR=/tmp/$MODULENAME.$$ 
     
    576579} 
    577580 
     581# Links any sound files found in $PBXSOUNDSDIR and $VMSOUNDSDIR 
     582# into $ASTSOUNDSDIR for use by Asterisk. Does not overwrite files. 
     583pbx_link_sounds() 
     584{ 
     585    mkdir -p $ASTSOUNDSDIR 
     586 
     587    for dir in $PBXSOUNDSDIR $VMSOUNDSDIR ; do 
     588        if [ -d $dir ] ; then 
     589            for f in $dir/* ; do 
     590                ln -s $f $ASTSOUNDSDIR 2>/dev/null 
     591            done 
     592        fi 
     593    done 
     594} 
     595 
     596 
    578597# Makes sure the ownership of specified directories is proper. 
    579598pbx_fix_ownership() 
     
    668687    config_unset 
    669688    config_load ${MODULENAME}-voicemail 
    670     pbx_configure_voicemail     
     689    pbx_configure_voicemail 
    671690 
    672691    # Assemble the configuration, and copy changed files over. 
     
    675694    pbx_assemble_and_copy_config 
    676695 
     696    # Link sound files 
     697    pbx_link_sounds 
     698 
    677699    # Enforce ownership of specified files and directories. 
    678700    pbx_fix_ownership