Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2023 11:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Sample custom periodic script
#!/bin/sh -
# $FreeBSD$
# Put into /usr/local/etc/periodic/daily
# If there is a global system configuration file, suck it in.
if [ -r /etc/defaults/periodic.conf ]
. /etc/defaults/periodic.conf
case "$daily_backup_system_enable" in
echo ""
echo "Backing up system configuration files:"
# Create list of installed pkg
pkg prime-origins > /usr/local/etc/pkg.installed
# Init
export RESTIC_PASSWORD_FILE=/usr/local/etc/restic-repo.passwd
export RESTIC_REPOSITORY=rclone:fritz.ftp:/FOLDER/gion-io-system
echo $daily_backup_system_dirs
restic backup $daily_backup_system_dirs -o rclone.connections=1
*) rc=0;;
exit $rc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment