-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agregamos un alias para obtener información del hardware, e iniciamos…
… el script de twidge para twittear desde la terminal de comandos
- Loading branch information
1 parent
4cfad69
commit 5d46757
Showing
5 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
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
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.
Empty file.
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
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." |