creates a fully running instance of apacheds

This commit is contained in:
7u83 2020-07-23 21:35:03 +00:00
parent 76186cb559
commit 55a9c8f712
1 changed files with 29 additions and 4 deletions

View File

@ -1,9 +1,9 @@
#
#
# apacheds
#
class plnxtools::apacheds(
$ads_shutdown_port = 0,
$appname = "apacheds"
$appname = "apacheds",
$ads_instances = "/var/apacheds",
$ads_logdir = "/var/log/$appname",
@ -40,7 +40,32 @@ define plnxtools::apacheds::instance(
$ensure = running
) {
service {$title:
start => "$plnxtools::apacheds::$opt_dir/$plnxtools::apacheds::$appname/bin/apachds.sh $title start"
$ads_instances = $plnxtools::apacheds::ads_instances
$log_file = "$plnxtools::apacheds::ads_logdir/$title.log"
file{"$ads_instances/$title":
ensure => directory
} ->
file{"$ads_instances/$title/conf":
ensure => directory
} ->
file{"$ads_instances/$title/log":
ensure => directory
} ->
file{"$ads_instances/$title/run":
ensure => directory
} ->
file{"$ads_instances/$title/conf/log4j.properties":
ensure => file,
content => template ("plnxtools/apacheds/log4j.properties.erb"),
}
$bin_dir = "${plnxtools::apacheds::opt_dir}/${plnxtools::apacheds::appname}/bin"
service {"apacheds_${title}":
start => "$bin_dir/apacheds.sh $title start",
stop => "$bin_dir/apacheds.sh $title stop",
status => "/bin/false",
ensure => running
}
}