Skip to content

Instantly share code, notes, and snippets.

View pedrom34's full-sized avatar
🙈

Pierre pedrom34

🙈
View GitHub Profile
@pedrom34
pedrom34 / whitelist.sh
Last active December 21, 2023 14:04
Whitelist public IP in Authelia and Crowdsec, notify, log and restart containers.
#!/bin/bash
# Set the path to the .last_ip file
LAST_IP_FILE=/opt/scripts/.last_ip
# Get the current IP address
CURRENT_IP=$(curl -s ifconfig.co)
VALID_IP=$( [[ $CURRENT_IP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo true || echo false )
# set telegram infos
@pedrom34
pedrom34 / firefly-update.sh
Last active March 26, 2024 23:47
Script to update firefly-iii
#!/bin/bash
#Modify next line to where your firefly-iii instance is installed to.
cd /var/www
#Remove old backup of firefly-iii
rm -r firefly-iii-old
#Backup current version of firefly-iii
cp -r firefly-iii firefly-iii-old
@pedrom34
pedrom34 / asuswrt-ovh-ddns.sh
Last active June 21, 2022 22:15
Working (tested) asuswrt-merlin Custom DDNS script for OVH with Double NAT option
#!/bin/sh
###
# Based on
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#google-domains
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#bind9-ddns-using-nsupdate
#
# Forked from
# https://gist.github.com/atais/9ea6595072096ab8077f619bd3648da8
###