Linux Scripts (3)


Block Ads using dnsmasq – Synology

DNSMasq is a very light-weight DNS server that is perfectly suited to run on low power home appliances like NAS devices or routers running custom firmware. The script below pulls ad blocking host files from 3 different providers and combines them to use as a DNSMasq resolver file. Here is the script – it can […]




Reboot server if it runs too low on physical memory and is swapping too much

I had an old workstation lying around at home that I used as a caching dns server. This server had very little memory to begin with and would sometimes OOM on me when I was not at home. This was an unnecessary headache, so I wrote a script to reboot the server if it had […]




Script to kill processes older than x days.

On a linux farm sometimes there would be a need to kill processes that have been running for extended periods of time and notify the users before doing it. I had such a requirement and had to scour the internet for a lot of long hours to find a proper script to get this job […]