Phpmyadmin + webmin en menú de Elastix

alejobotero

Joined
Oct 20, 2007
Messages
37
Likes
0
Points
0
#1
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
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#2
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
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#3
Ojo con los comandos, revisalos bien, que el maldito Fireboard parte algunas lineas en 2.
 

alejobotero

Joined
Oct 20, 2007
Messages
37
Likes
0
Points
0
#4
Gracias por tu ayuda ramoncio. Funcionó excelente
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#5
Me alegro que todo te funcionase a la primera.
 

alejobotero

Joined
Oct 20, 2007
Messages
37
Likes
0
Points
0
#6
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
 

Makina1982

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

gracias
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,918
Messages
130,924
Members
17,601
Latest member
andrebr
Top