Ir al contenido principal

checkSystem

Hola a todos otra vez.

Hoy dejo una nueva pequeña utilidad tonta para que se compruebe constantemente que EL SISTEMA ENTERO esta funcionando bien, y en caso de fallo se informe a la cuenta de correo que se configure. Ver anexo 1

Astaló

pd. Edita el .properties para poner los datos de la cuenta desde la que manda correos
ppd. En el anexo 2 hay un bashscript de instalacion facilon facilon

--

Hello everyone again

Today I left here another little stupid utility to check cyclically for THE WHOLE SYSTEM to be working correctly, if an error is found a mail is sent to a configured address. See annex 1

Bye!

pd. Edit the .properties to fill the credentials of the sender account
ppd. Really easy installation script file in annex 2

--

Anexo 1

http://checksystemcron.googlecode.com/files/checksystemcron-0.0.1.zip

Anexo 2

# Install checkSystem
wget http://checksystemcron.googlecode.com/files/checksystemcron-0.0.1.zip
7z x -y checksystemcron-0.0.1.zip
mv checksystemcron /usr/share
CHECKSYSTEM_EXEC="/usr/share/checksystemcron/checkSystem.py"
CHECKSYSTEM_CONFIG_FILE="/usr/share/checksystemcron/checkSystem.properties"
mv $CHECKSYSTEM_CONFIG_FILE $CHECKSYSTEM_CONFIG_FILE.old
cat $CHECKSYSTEM_CONFIG_FILE.old |
sed 's/gmail_user =.*/gmail_user=tuusuario@gmail.com/g' |
sed 's/gmail_pwd =.*/gmail_pwd=tupwd/g' > $CHECKSYSTEM_CONFIG_FILE
chmod 777 $CHECKSYSTEM_EXEC
rm checksystemcron-0.0.1.zip
ln -s $CHECKSYSTEM_EXEC /usr/bin/checkSystem


Comentarios

Entradas populares de este blog

Use rclone to mount cloud storage

I realized that the fat clients that allows you to sync your contents are not only wasting CPU cycles but also lots of disk space. Yes, that enables you to have the file opened almost instantly, no matter its size, but for me that use case is almost never needed, I use the cloud storage to save stuff that is in the range of a few MiB. Here is where rclone comes into play, it allows you to mount your storage as if it were a regular disk, and it handles the communication with the cloud servers on the go. As there are many different combinations I'll cover only two Linux w/ Dropbox curl https://rclone.org/install.sh | bash # Use rclone config to add a new remote called db for dropbox MAIN_USER=$SUDO_USER MAIN_USER_HOME=$(grep ^$SUDO_USER: /etc/passwd | head -1 | cut -d: -f6) mkdir /media/db chown $MAIN_USER:$MAIN_USER /media/db cat <<EOF > /lib/systemd/system/rclone-db.service [Unit] Description=Dropbox rclone mount After=multi-user.targetrclone [Service] Type=simple User=$ M...