Phpmyadmin + webmin en menú de Elastix

Discussion in 'Elastix 2.x' started by alejobotero, May 21, 2009.

  1. alejobotero

    Joined:
    Oct 20, 2007
    Messages:
    37
    Likes Received:
    0
    Saludos.

    He seguido las instrucciones de Asterisk without tears acerca de la instalación de phpmyadmin y Webmin. Ambas funcionan sin problemas.

    Lo que me corchó fué agregar estas dos aplicaciones al menú de Elastix. Alguien podría colaborarme ?

    127.0.0.1:10000 para el webmin
    127.0.0.1/modules/phpmyadmin para el Phpmyadmin

    Estas son dos excelentes herramientas que lamentablemente no estan presentes en Elastix y quisiera tenerlas. Bajé el módulo Developer 1.0b5, pero no he podido hacer que me muestre lo que he agregado. Deseo que ambas herramientas aparescan en el nivel 2 de System.

    Gracias por la colaboración
     
  2. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Para webmin

    Code:
    # Add Elastix menuitem for webmin
    last_resource=`sqlite3 /var/www/db/acl.db "select * from acl_resource;" | awk -F "|" '1 { print  $1 }' | tail -1` 
    resource_to_use=`expr $last_resource + 1` 
    last_permission=`sqlite3 /var/www/db/acl.db "select * from acl_group_permission;" | awk -F "|" '1 { print  $1 }' | tail -1` 
    group_permission_to_use=`expr $last_permission + 1` 
    sqlite3 /var/www/db/menu.db  "insert into menu (id,IdPArent,Link,Name,Type) values ('Webmin','system','https://`ifconfig | grep 'inet addr:' | grep -v 127.0.0.1 | cut -f2 -d: | awk '{print $1":10000"}'`','Webmin','framed');" 
    sqlite3 /var/www/db/acl.db  "insert into acl_resource (id,name,description) values ('$resource_to_use','Webmin','Webmin');" 
    sqlite3 /var/www/db/acl.db  "insert into acl_group_permission (id,id_action,id_group,id_resource) values ('$group_permission_to_use',1,1,'$resource_to_use');" 
    # Add translations to all lang files
    for i in `ls -1 /var/www/html/lang/`; do 
    mv /var/www/html/lang/$i /var/www/html/lang/$i.backup
    sed '/^\$arrLang=array/a \"Webmin\" => \"Webmin\",' /var/www/html/lang/$i.backup > /var/www/html/lang/$i
    done;
    rm -rf /var/www/html/lang/*.backup
    
    Para phpmyadmin:

    Code:
    # Add Elastix menuitem for phpmyadmin
    last_resource=`sqlite3 /var/www/db/acl.db "select * from acl_resource;" | awk -F "|" '1 { print  $1 }' | tail -1` 
    resource_to_use=`expr $last_resource + 1` 
    last_permission=`sqlite3 /var/www/db/acl.db "select * from acl_group_permission;" | awk -F "|" '1 { print  $1 }' | tail -1` 
    group_permission_to_use=`expr $last_permission + 1` 
    sqlite3 /var/www/db/menu.db  "insert into menu (id,IdPArent,Link,Name,Type) values ('phpmyadmin','system','modules/phpmyadmin','phpmyadmin','framed');" 
    sqlite3 /var/www/db/acl.db  "insert into acl_resource (id,name,description) values ('$resource_to_use','phpmyadmin','phpmyadmin');" 
    sqlite3 /var/www/db/acl.db  "insert into acl_group_permission (id,id_action,id_group,id_resource) values ('$group_permission_to_use',1,1,'$resource_to_use');" 
    # Add translations to all lang files
    for i in `ls -1 /var/www/html/lang/`; do 
    mv /var/www/html/lang/$i /var/www/html/lang/$i.backup
    sed '/^\$arrLang=array/a \"phpmyadmin\" => \"phpmyadmin\",' /var/www/html/lang/$i.backup > /var/www/html/lang/$i
    done;
    rm -rf /var/www/html/lang/*.backup
    
     
  3. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Ojo con los comandos, revisalos bien, que el maldito Fireboard parte algunas lineas en 2.
     
  4. alejobotero

    Joined:
    Oct 20, 2007
    Messages:
    37
    Likes Received:
    0
    Gracias por tu ayuda ramoncio. Funcionó excelente
     
  5. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Me alegro que todo te funcionase a la primera.
     
  6. alejobotero

    Joined:
    Oct 20, 2007
    Messages:
    37
    Likes Received:
    0
    Siguiendo las instruciones de ramoncio, he creado el enlace para orderlyq.

    Code:
    # Add Elastix menuitem for orderlyq
    last_resource=`sqlite3 /var/www/db/acl.db "select * from acl_resource;" | awk -F "|" '1 { print  $1 }' | tail -1` 
    resource_to_use=`expr $last_resource + 1` 
    last_permission=`sqlite3 /var/www/db/acl.db "select * from acl_group_permission;" | awk -F "|" '1 { print  $1 }' | tail -1` 
    group_permission_to_use=`expr $last_permission + 1` 
    sqlite3 /var/www/db/menu.db  "insert into menu (id,IdPArent,Link,Name,Type) values ('Orderlyq','system','http://`ifconfig | grep 'inet addr:' | grep -v 127.0.0.1 | cut -f2 -d: | awk '{print $1":8080/orderlystatsse"}'`','Orderlyq','framed');" 
    sqlite3 /var/www/db/acl.db  "insert into acl_resource (id,name,description) values ('$resource_to_use','Orderlyq','Orderlyq');" 
    sqlite3 /var/www/db/acl.db  "insert into acl_group_permission (id,id_action,id_group,id_resource) values ('$group_permission_to_use',1,1,'$resource_to_use');" 
    
    # Add translations to all lang files
    for i in `ls -1 /var/www/html/lang/`; do 
    mv /var/www/html/lang/$i /var/www/html/lang/$i.backup
    sed '/^$arrLang=array/a "Orderlyq" => "Orderlyq",' /var/www/html/lang/$i.backup > /var/www/html/lang/$i
    done;
    rm -rf /var/www/html/lang/*.backup
    
     
  7. Makina1982

    Joined:
    Oct 29, 2008
    Messages:
    8
    Likes Received:
    0
    Estimados discuñpen la ignorancia donde debo agrgar esto
    127.0.0.1/modules/phpmyadmin para el Phpmyadmin

    gracias
     

Share This Page