diff --git a/roles/core/userland-software/files/720.portsnap b/roles/core/userland-software/files/720.portsnap new file mode 100755 --- /dev/null +++ b/roles/core/userland-software/files/720.portsnap @@ -0,0 +1,39 @@ +#!/bin/sh + +# ------------------------------------------------------------- +# Fetch ports +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Project: Nasqueron +# Author : FreeBSD contributors +# License: BSD-2-Clause +# Source file: roles/core/userland-software/files/720.portsnap +# ------------------------------------------------------------- +# +# <auto-generated> +# This file is managed by our rOPS SaltStack repository. +# +# Changes to this file may cause incorrect behavior +# and will be lost if the state is redeployed. +# </auto-generated> +# ------------------------------------------------------------- + + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_portsnap_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Running portsnap:" + + portsnap auto && rc=0 || rc=3;; + + *) rc=0;; +esac + +exit $rc diff --git a/roles/core/userland-software/init.sls b/roles/core/userland-software/init.sls --- a/roles/core/userland-software/init.sls +++ b/roles/core/userland-software/init.sls @@ -41,6 +41,12 @@ - target: /var/lib/snapd/snap {% endif %} +{% if grains['os'] == 'FreeBSD' %} +/etc/periodioc/daily/720.portsnap: + file.managed: + - source: salt://roles/core/userland-software/files/720.portsnap +{% endif %} + # ------------------------------------------------------------- # Shells # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -