Skip to content

Instantly share code, notes, and snippets.

@johnjaylward
johnjaylward / crontab-jails.sh
Last active August 29, 2015 14:26 — forked from takeshixx/contab-jails.sh
Crontab script for FreeBSD Jails (update seperate ports tree, run portaudit, check for port updates)
#!/usr/local/bin/bash
# modified for freenas from https://gist.github.com/takeshixx/7487381
SHELL=/usr/local/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
JAIL_PORTS=/mnt/jails/ports
SECTION=' * * * * * * '
DELIMITER='------------------------------'
#updates shared ports dir that is null mounted into each jail
#portsnap -p $JAIL_PORTS fetch extract &>/dev/null || echo "Updating ports tree failed!"