Skip to content

Commit

Permalink
Agregamos un alias para obtener información del hardware, e iniciamos…
Browse files Browse the repository at this point in the history
… el script de twidge para twittear desde la terminal de comandos
  • Loading branch information
eisenheimjelid committed Jul 17, 2015
1 parent 4cfad69 commit 5d46757
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions base/alias/alias-debug
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ alias rm='rm -i'
##
alias red_servicios='netstat -ntap'

##
# Comando y alias para buscar la informacion base del sistema,
# modelo, marca, numero de serie y/o uuid
##
alias me_info='sudo dmidecode -t 1'

echo "Terminado aliases"
10 changes: 10 additions & 0 deletions medium/twit/alive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
### Script para reportar al servidor aun con vida
UP=$(uptime -p)
HOST="02 "$UP
fortune="/usr/games/fortune -n 80"
echo `$fortune` > /root/temp
PRHASE=$(head -n 1 /root/temp)
TWIT=$HOST" "$PRHASE
echo $TWIT | twidge --config=/root/.twidgerc update

Empty file added medium/twit/init
Empty file.
Empty file added medium/twit/twit
Empty file.
20 changes: 20 additions & 0 deletions medium/twit/twit-debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

echo "Iniciando twit..."

##
# Obtenemos el tiempo que ha estado funcionando el equipo
# y lo enviamos a Twitter a través de twidge
##

# Con este comando obtenemos el tiempo que ha estado funcionando
UP=$(uptime -p)

# Con este comando obtenemos el nombre del host
HOST=$(hostname)

# Imprimimos el mensaje y lo enviamos con ciertas opciones a twidge
echo $HOST" "$UP | twidge --config=/home/davnet/.twidgerc update

# https://twitter.com/jelidleon/status/622192817071206400
echo "Twit enviado."

0 comments on commit 5d46757

Please sign in to comment.