creates a fully running instance of apacheds
This commit is contained in:
parent
76186cb559
commit
55a9c8f712
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
#
|
# apacheds
|
||||||
#
|
#
|
||||||
class plnxtools::apacheds(
|
class plnxtools::apacheds(
|
||||||
$ads_shutdown_port = 0,
|
$ads_shutdown_port = 0,
|
||||||
$appname = "apacheds"
|
$appname = "apacheds",
|
||||||
$ads_instances = "/var/apacheds",
|
$ads_instances = "/var/apacheds",
|
||||||
$ads_logdir = "/var/log/$appname",
|
$ads_logdir = "/var/log/$appname",
|
||||||
|
|
||||||
|
@ -40,7 +40,32 @@ define plnxtools::apacheds::instance(
|
||||||
$ensure = running
|
$ensure = running
|
||||||
|
|
||||||
) {
|
) {
|
||||||
service {$title:
|
$ads_instances = $plnxtools::apacheds::ads_instances
|
||||||
start => "$plnxtools::apacheds::$opt_dir/$plnxtools::apacheds::$appname/bin/apachds.sh $title start"
|
$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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue