Skip to content

Instantly share code, notes, and snippets.

# Use this file to easily define all of your cron jobs.
# #
# # It's helpful, but not entirely necessary to understand cron before proceeding.
# # http://en.wikipedia.org/wiki/Cron
#
# # Example:
# #
# # set :output, "/path/to/my/cron_log.log"
# #
# # every 2.hours do
Backup::Model.new(:appbackup, 'appbackup') do
store_with Local do |local|
local.path = '/backups/'
# Use a number or a Time object to specify how many backups to keep.
local.keep = 14
end
compress_with Bzip2
database PostgreSQL do |db|
@krisf
krisf / script.sh
Created June 19, 2024 11:23
ping check two LAN hosts, if it fails twice in a row (15min cron job) notify user and shut down the unraid server gracefully
#!/usr/bin/env bash
if ping -c 1 192.168.0.200 &> /dev/null
then
echo "ping success, exiting"
rm /tmp/failed_ping_touchfile
exit 0
else
echo "ping fail, checking second host"
if ping -c 1 192.168.0.220 &> /dev/null