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 | |
timeslot=$(date +"%Y%m%d_%H-%M"); | |
exec > log.$timeslot 2>&1 | |
set -x | |
DBs=$(psql -l|grep -v 'Name\|Nombre\|:\|rows\|filas\|\---\|databases\|Listado\|postgres\|template'|awk '{print $1}'|grep -v ^\|); | |
for db in $DBs; | |
do | |
pg_dump -sv $db -O > /var/lib/postgresql/bckps/sch_$db-$timeslot.sql; | |
sleep 5; |
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 | |
for i in seq 1 5; | |
do | |
sh -c "echo -e '\a' > /dev/console"; | |
sleep 1; | |
done |
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
#!/usr/bin/perl | |
#arreglo de usuarios | |
@ users = &fetchPass; | |
$i = 0; | |
$j = 0; | |
sub fetchPass | |
{ | |
use DBI; |
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 | |
RUTA="$TR_TORRENT_DIR/$TR_TORRENT_NAME" | |
FECHA=`date` | |
LOG="/home/altmas5/dev/scripts/transmission.log" | |
echo "$FECHA" >> "$LOG" | |
echo "$RUTA" >> "$LOG" |
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 | |
#setear brillo por debajo de lo permitido por los botones | |
#en HP Mini 110-3700 | |
echo "200"> /sys/devices/pci0000\:00/0000\:00\:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness |
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 | |
exp="ppp0" | |
logfile="/var/appdata/detach.log" | |
timeslot=$(date +"%H:%M:%S %d/%m/%Y"); | |
echo "********** Iniciando detach.sh a las $timeslot *********" >> $logfile | |
function reconect { | |
pid=$(fuser /dev/ttymxc2); | |
kill $pid; | |
ppp-on |
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
group = core | |
admin-port = 13000 | |
admin-password = foo | |
status-password = bar | |
admin-deny-ip = "*.*.*.*" | |
admin-allow-ip = "*.*.*.*" | |
log-file = "/var/log/kannel/bearerbox.log" | |
access-log = "/var/log/kannel/access.log" | |
store-type = file | |
store-location = "/var/log/kannel/queue.log" |
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
[outbound-allroutes] | |
include => outbound-allroutes-custom | |
include => outrt-1 ; Claro | |
include => outrt-3 ; Movistar | |
include => outrt-2 ; internos | |
include => outrt-4 ; Fijos | |
exten => foo,1,Noop(bar) | |
; end of [outbound-allroutes] |
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 | |
> data.xml | |
dia=$(date +%d) | |
mes=$(date +%m) | |
anio=$(date +%Y) | |
hoy=$dia"/"$mes"/"$anio; | |
echo '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://servicios.bcn.gob.ni/">' >> data.xml |
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
strace packettracer | |
execve("/usr/local/bin/packettracer", ["packettracer"], [/* 96 vars */]) = 0 | |
brk(NULL) = 0x13d8000 | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faedd377000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/lib64/bash/4.3/tls/x86_64/libreadline.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/lib64/bash/4.3/tls/x86_64", 0x7ffd89918ec0) = -1 ENOENT (No such file or directory) | |
open("/lib64/bash/4.3/tls/libreadline.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/lib64/bash/4.3/tls", 0x7ffd89918ec0) = -1 ENOENT (No such file or directory) | |
open("/lib64/bash/4.3/x86_64/libreadline.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) |