Skip to content

Instantly share code, notes, and snippets.

View Tayrannosaur's full-sized avatar
🏠
Working from home

Taylor Tayrannosaur

🏠
Working from home
View GitHub Profile
@Tayrannosaur
Tayrannosaur / nix-daemon
Last active December 3, 2022 12:48
nix-daemon service script for OpenRC
#!/sbin/openrc-run
name="nix-daemon"
description="Nix Daemon"
supervisor="supervise-daemon"
command="/nix/var/nix/profiles/default/bin/nix-daemon"
pidfile="/run/${RC_SVCNAME}.pid"
command_background=true
@Tayrannosaur
Tayrannosaur / foundry_backup
Created August 14, 2022 21:41
Script for backing up FoundryVTT data on my Linux server, meant to be run automatically.
#! /usr/bin/bash
# The path to your FoundryVTT data. Change this as necessary.
DATA_DIR="$HOME/foundrydata/"
# Where you want your backups to be stored.
BACKUP_DIR="$DATA_DIR/../foundry_backups/"
# How many backups to keep before deleting the oldest one.
MAX_BACKUPS=5