Skip to content

Instantly share code, notes, and snippets.

@hjbotha
hjbotha / traefik.sh
Last active April 13, 2020 12:05
wrapper script to daemonise traefik
#! /bin/bash
set -e
#set -x
ROOT=$(dirname $0)
cd $ROOT
# export your cloudflare API key by uncommenting or placing the following lines (uncommented) in traefik.conf
@hjbotha
hjbotha / check_backups.sh
Last active November 8, 2021 13:37
Submit Synology backup task results to Icinga
#! /bin/bash -e
# This script searches HyperBackup or ActiveBackup logs to determine
# the last time a specified backup task completed successfully
# That timestamp is then submitted to Icinga along with an OK
# if the task was completed within the last number of hours
# specified by the -w value, WARNING if between the values of
# -w and -c, and CRITICAL for values over that.
# If no value is given for -w it will be set to -c.
# For that submission to work, the following have to be true:
@hjbotha
hjbotha / free_ports.sh
Last active April 17, 2024 06:08
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx