This file contains 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 | |
########################################################### | |
# Purpose: Simple script to enable and disable ad blocking | |
# for technitium DNS server via API calls | |
# | |
# Usage: provide either 'enable' to enable ad blocking | |
# or 'disable DURATION' to disable | |
# | |
# Author: kernelkaribou@github |
This file contains 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
################################################################################# | |
# Summary: | |
# This basic function is for when you have multiple servers you use login | |
# aliases but would not like to manage adding many aliases, especially when | |
# consistent with minor changes, like hostname. | |
# | |
# Setup: | |
# This script assumes you are on Windows. Add the below function to your | |
# powershell profile. This can be easily edited (or created) with the | |
# command: |
This file contains 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 | |
#################################################################################### | |
# Author: Kernelkaribou@github | |
# | |
# Purpose: Update a DNS record hosted at Cloudflare to represent network public IP. | |
# Based upon Cloudflare API v4 | |
# | |
# In cloudflare, create API key for your zone in question, e.g. example.com | |
# Ensuring that it has Zone Read and DNS Edit permissions. DO NOT use a Global Key |
This file contains 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 | |
###################################################################### | |
# Bash script for backing up varying docker database containers | |
# | |
# This will search for containers using common database image names | |
# Currently supports postgrest and mariadb | |
# This uses the common pg_dump and mysqldump methods of backup | |
# It will also gzip the results if the -c flag is passed | |
# Note: This is built with linuxserver MariaDB container but should |
This file contains 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 | |
###################################################################### | |
# Bash script for syncing pihole servers to a secondary | |
# | |
# This tool will allow you sync common pihole settings, either | |
# full server (DNS Records and Gravity DB for adlists) or select | |
# specific syncs to perform. It does NOT sync the core config settings | |
# of the instance found in setupVars.conf | |
# |
This file contains 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 | |
#################################################################################### | |
# Author: Kernelkaribou@github | |
# | |
# Purpose: Update a DNS record hosted at Cloudflare to represent network public IP. | |
# Based upon Cloudflare API v4 | |
# | |
# Additional Notes: This will send notifications to Synology log center. | |
# Comment out writeLog lines if not desired or on Synology platform |
This file contains 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 | |
SCRIPT_CMD="/bin/bash ./my_script.sh" | |
TOTAL_RUNS=2 | |
SLEEP_TIME=30 | |
let SLEEP_COUNTER=TOTAL_RUNS-1 | |
COUNTER=0 | |
while [ $COUNTER -lt $TOTAL_RUNS ]; do | |
eval $SCRIPT_CMD |
This file contains 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
#Formatting of data sent in bytes to label in largest size | |
def format_data_type(i, type): | |
loop = 0 | |
current_num = i | |
last_num = 0 | |
if type == "net": | |
label = ["Bps", "KBps", "MBps", "GBps"] | |
if type == "size": | |
label = ["B", "KB", "MB", "GB", "TB"] | |
while(True): |