aboutsummaryrefslogtreecommitdiff
path: root/manifests/extension_script.pp
blob: 2b9579cf542dcb1db6da66172f29d00250786903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# See http://shorewall.net/shorewall_extension_scripts.htm
define extension_script($script = '') {
    case $name {
        'init', 'initdone', 'start', 'started', 'stop', 'stopped', 'clear', 'refresh', 'continue', 'maclog': {
            shorewall::managed_file { "${name}": }
            shorewall::entry { "${name}.d/500-${hostname}":
                line => "${script}\n";
            }
        }
        '', default: {
            err("${name}: unknown shorewall extension script")
        }
    }
}