Skip to content

Commit

Permalink
Test whether or not passing the passwordfile to asadmin when starting…
Browse files Browse the repository at this point in the history
… a domain solves the problem.
  • Loading branch information
PeterParker committed Feb 24, 2016
1 parent c613a37 commit 7a6043b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion manifests/create_service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
$mode = 'domain',
$das_port = undef,
$status_cmd = undef,
$service_name = undef) {
$service_name = undef,
$asadmin_passfile = $glassfish::asadmin_passfile) {
# Check that we've got a domain name if domain mode.
if $mode == 'domain' and !$domain_name {
fail('Domain name must be specified to install service for domain mode.')
Expand Down
3 changes: 2 additions & 1 deletion templates/glassfish-init-domain-el.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ GLASSFISH_BIN="<%= scope.lookupvar('glassfish::glassfish_dir') %>/glassfish/bin"

# Setup Domain and User values
DOMAIN="<%= @domain_name %>"
PWFILE="<%= @asadmin_passfile %>"
USER="<%= @runuser %>"

start() {
echo -n "Starting glassfish domain $DOMAIN: "
daemon --user $USER --pidfile /var/run/glassfish_$DOMAIN.pid "$GLASSFISH_BIN/asadmin start-domain $DOMAIN"
daemon --user $USER --pidfile /var/run/glassfish_$DOMAIN.pid "$GLASSFISH_BIN/asadmin start-domain --passwordfile $PWFILE $DOMAIN"
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
PID=`ps U $USER | grep $DOMAIN | awk '{ print $1}'`
Expand Down

0 comments on commit 7a6043b

Please sign in to comment.