diff --git a/files/rundeck_version b/files/rundeck_version index ed2c2d105..6d74983e3 100755 --- a/files/rundeck_version +++ b/files/rundeck_version @@ -1,3 +1,11 @@ -# Ask puppet what version of rundeck is installed. -# Will return the version or if not available: "absent". -puppet resource package rundeck | grep ensure | awk '{print $NF}' | sed "s/'//g;s/,//g" +#!/bin/env bash + +if [ -x /usr/bin/dpkg ]; then + VERSION=`dpkg -l | grep rundeck | awk '{ print $3}'` + echo "rundeck_version=$VERSION" +fi + +if [ -x /usr/bin/yum ]; then + VERSION=`yum list installed|awk '/rundeck\./{print $2}'` + echo "rundeck_version=$VERSION" +fi