
I've imported a few puppet scripts from my asterisk package. This will add reload support to asterisk until I get a chance to update the module for CentOS. Change-Id: I6d7f1d7b415de8fc9ccd55e887a6050f2e32f2a7 Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
48 lines
910 B
Puppet
48 lines
910 B
Puppet
# == Define: asterisk::function::customdir
|
|
#
|
|
# This class manages the asterisk server
|
|
#
|
|
# === Examples
|
|
#
|
|
# asterisk::function::customdir { 'cdr.conf': }
|
|
#
|
|
# === Authors
|
|
#
|
|
# Paul Belanger <paul.belanger@polybeacon.com>
|
|
#
|
|
# === Copyright
|
|
#
|
|
# Copyright (C) 2012, PolyBeacon, Inc.
|
|
#
|
|
# This program is free software, distributed under the terms
|
|
# of the Apache License, Version 2.0. See the LICENSE file at
|
|
# the top of the source tree.
|
|
#
|
|
define asterisk::function::customdir(
|
|
) {
|
|
include asterisk
|
|
|
|
File {
|
|
group => 'asterisk',
|
|
mode => '0640',
|
|
owner => 'asterisk',
|
|
}
|
|
|
|
$basedir = '/etc/asterisk'
|
|
$base = "${basedir}/${name}.d"
|
|
|
|
file { $base:
|
|
ensure => directory,
|
|
force => true,
|
|
notify => Exec["asterisk-module-reload-${name}"],
|
|
purge => true,
|
|
recurse => true,
|
|
require => [
|
|
File[$basedir],
|
|
Service['asterisk'],
|
|
]
|
|
}
|
|
}
|
|
|
|
# vim:sw=2:ts=2:expandtab
|