puppet-standalone-mashup/shared/modules/init_d_bundle/manifests/init.pp

31 lines
601 B
ObjectPascal
Raw Normal View History

2012-05-15 15:22:55 +00:00
define init_d_bundle($init_d_prolog, $init_d_prerun) {
2012-05-17 15:11:25 +00:00
$share_path = "${base::share_path}/${name}"
file { $share_path:
ensure => directory
}
$init_d_source = "${share_path}/${name}-init.d"
2012-05-15 15:22:55 +00:00
file { $init_d_source:
content => template("${name}/${name}-init.d"),
2012-05-17 15:11:25 +00:00
mode => 755,
require => File[$share_path]
2012-05-15 15:22:55 +00:00
}
$init_d = "/etc/init.d/${name}"
file { $init_d:
ensure => $init_d_source,
require => File[$init_d_source]
}
update_rc_d_defaults { $name:
require => File[$init_d]
}
running_service { $name:
require => Update_rc_d_defaults[$name]
}
}