This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context cadeado { | |
*55 => { | |
Answer(); | |
Wait(1); | |
Set(Pass=${DB(Senha/${CALLERID(num)})}); | |
Authenticate(${Pass},d); | |
Set(DB(Cadeado/${CALLERID(num)})=1); | |
Playback(cadeado-ativo); | |
} | |
*56 => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cadeado] | |
;;;Ativa cadeado | |
exten => _*55,1,Answer() | |
exten => _*55,2,Wait(1) | |
exten => _*55,3,Set(Pass=${DB(Senha/${CALLERID(num)})}) | |
exten => _*55,4,Authenticate(${Pass},d) | |
exten => _*55,5,Set(DB(Cadeado/${CALLERID(num)})=1) | |
exten => _*55,6,Playback(cadeado-ativo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Autor: Rodrigo Lang | |
# Data: 02/01/2013 | |
SENDER='/usr/local/zabbix/bin/zabbix_sender' | |
HOST='Zabbix server' | |
IP='127.0.0.1' | |
ALL_DBS=$(psql --dbname postgres -Atc "SELECT pg_database.datname, PG_DATABASE_SIZE(pg_database.datname) AS SIZE FROM pg_database") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[desvios] | |
include => desvio-imediato | |
include => desvio-ocupado | |
include => desvio-timeout | |
[desvio-imediato] | |
exten => *50,1,Answer(1) | |
exten => *50,2,Set(EXISTE=${DB_EXISTS(DesvioImediato/${CALLERID(num)})}) | |
exten => *50,3,GotoIf($["${EXISTE}" = "0"]?continua:desliga) | |
exten => *50,4(continua),Playback(ramal) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ `id -u` -eq 0 ] || { echo "You must have root privilege to run this script." && exit 0; } | |
check_network() { | |
echo "\nTesting your internet connection. This process may take a few seconds..." | |
ping 8.8.8.8 -W5 -c1 >/dev/null; | |
if [ $? != "0" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Autor: Rodrigo Lang | |
# Data: 08/12/2012 | |
lines=$(psql --dbname postgres -Atc '\l' | grep '|' | cut -d'|' -f1 | wc -l) | |
loop=1 | |
inicio="{\"data\":[" | |
NewerOlder