Skip to content

Instantly share code, notes, and snippets.

View vrdominguez's full-sized avatar

Víctor R. Rodríguez Domínguez vrdominguez

View GitHub Profile
@vrdominguez
vrdominguez / lcd-daemon
Created February 12, 2014 16:00
lcd-daemon init.d
#! /bin/bash
# Copyright (c) 1996-2012 My Company.
# All rights reserved.
#
# Author: Victor Rodriguez, 2014
#
# /etc/init.d/lcd-daemon
#
### BEGIN INIT INFO
# Provides: lcd-daemon
@vrdominguez
vrdominguez / dinaip
Last active March 26, 2017 09:39
Script para gestionar el demonio de dinaIp como un servicio más del sistema. Más info: http://vrdominguez.es/sustituir-dyndns-con-una-raspberry-y-dinaip/
#!/bin/bash
# Author: Victor Rodriguez, 2014
#
# /etc/init.d/dinaip
#
### BEGIN INIT INFO
# Provides: dinaIP daemon
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
@vrdominguez
vrdominguez / logrotate_dinaip
Created April 15, 2014 15:57
Logrotate config for dinaIP logs
/var/log/dinaip.log {
rotate 7
daily
copytruncate
compress
missingok
notifempty
}
@vrdominguez
vrdominguez / dinaip
Created August 13, 2014 12:11
Versión para OpenWRT del script init.d para poner dinaIP como servicio
#!/bin/sh /etc/rc.common
# dinaIP Service for OpenWRT
# Author: Victor Rodriguez
# Date: 2014-08-13
START=70;
STOP=15;
# Comandos personalizados
EXTRA_COMMANDS="status list"
@vrdominguez
vrdominguez / dinaip.service
Last active April 1, 2018 17:42
dinaip service systemd
[Unit]
Description=dinaip - DDNS service by Dinahosting
[Service]
Type=forking
ExecStart=/usr/sbin/dinaip -u USER -p PASSWD
ExecStop=/usr/sbin/dinaip -d
PIDFile=/var/run/dinaip.pid
Restart=on-failure
@vrdominguez
vrdominguez / checkCertificado.sh
Created October 25, 2018 16:16
Obtener fecha de caducidad de un certificado remoto
#!/bin/bash
###############################################################################
# Calcula los dias que quedan para que un certificado remoto caduque, de modo #
# que podamos controlar si ya deberia de estar renovado #
###############################################################################
if [ $# -eq 0 ]; then
echo "No se ha pasado un dominio"
exit 1
@vrdominguez
vrdominguez / logid.cfg
Last active September 16, 2021 15:34
Configuración de logid para MX Master 3
devices: (
{
name: "Wireless Mouse MX Master 3";
smartshift:
{
on: true;
threshold: 30;
};