Skip to content

Commit

Permalink
Fixes #74 : define an unknown value for the confluence version rather…
Browse files Browse the repository at this point in the history
… than relying on its existance
  • Loading branch information
Jonathan Gray committed Jun 14, 2016
1 parent 6cd2cfc commit 12fc467
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## To be released

* Fixed issue with a clean puppet 4 based install failure.

## 2016-05-08 Release 2.2.1

* delete the .pmtignore (is redundant with our .gitignore)
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Merritt Krakowitzer
Bruce Morrison
gerhardsam
Jaco van Tonder
Jonathan Gray
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

$webappdir = "${installdir}/atlassian-${product}-${version}"

if $::confluence_version {
if $::confluence_version and $::confluence_version != 'unknown' {
# If the running version of CONFLUENCE is less than the expected version of CONFLUENCE
# Shut it down in preparation for upgrade.
if versioncmp($version, $::confluence_version) > 0 {
Expand Down
9 changes: 7 additions & 2 deletions templates/facts.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
# This is the best I can come up with right now. It needs to be replaced
# with a better solution.
#
# Facts:
# Facts:
# - confluence_version
#
#VERSION=`ps -ef|grep Dcatalina.home=| egrep -o 'Dcatalina.home=.*([0-9.]{1,}) '|grep -o '......$'|tr -d '[[:space:]]'|grep -Po '(?<=divider-bin-)[^;]+'`
VERSION=`ps -ef|grep Dcatalina.home=| egrep -o 'Dcatalina.home=.*atlassian-confluence-([0-9.]{1,}) '| perl -pe '($_)=/([0-9]+([.][0-9]+)+)/'`
echo "confluence_version=${VERSION}"
if [[ -z "$VERSION" ]]
then
echo "confluence_version=unknown";
else
echo "confluence_version=${VERSION}";
fi

0 comments on commit 12fc467

Please sign in to comment.