Skip to content

Instantly share code, notes, and snippets.

@hjbotha
hjbotha / traefik.sh
Last active Apr 13, 2020
wrapper script to daemonise traefik
View traefik.sh
#! /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 Jul 13, 2020
Submit Synology backup task results to Icinga
View check_backups.sh
#! /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 Jul 16, 2021
Free ports 80 and 443 on Synology NAS
View free_ports.sh
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Steps to install
# Save this script in one of your shares
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
# Run this script as root
# Reboot and ensure everything is still working