This file contains hidden or 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
| #!/bin/bash | |
| # parameters | |
| USERNAME="" | |
| PASSWORD="fritzbox-password" | |
| CERTPATH="/usr/syno/etc/certificate/system/default/" ##this is the default Path for Synology Cert | |
| CERTPASSWORD="" | |
| HOST=http://192.168.178.1 ## I use IP instead of fritz.box for synology updates | |
| # make and secure a temporary file |
This file contains hidden or 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
| #!/bin/bash | |
| ## all Fail2Ban Log should be logged into /var/log/fail2ban.log then this will work | |
| ## you need geoiplookup to get it runningyou can install it with sudo apt install geoip-bin | |
| cat /var/log/fail2ban.log* | grep Ban | sed 's/.*[Bb]an \(.*\)/\1/' | uniq | while read line; do geoiplookup $line; done | sort | uniq -c | sort -nr |
This file contains hidden or 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
| #!/bin/bash | |
| read -e -p "Please insert file: " file | |
| if test -e $file | |
| then pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps | |
| else echo "File not found!" | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| ## this little Gist is for Copy the Letsencrypt Cert from an Linux machine (e.g. Raspberry PI or Synology NAS) | |
| ## to the router (Fritzbox). | |
| ## It is usefull to be able to speak to the Router over DDNS without any Cert issue in the Browser. | |
| ## thanks to https://gist.github.com/mahowi for the perfect Idea | |
| ## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal. | |
| ## since Fritz OS 7.25 it is needed to select a Username, from a security point of view | |
| ## it is always a good idea to have a non default user name. And as normaly a Fritz Box | |
| ## is connected to the Internet, the prefered method should be WITH Username. |