Skip to content

Commit

Permalink
add functionality to detect the grapi version
Browse files Browse the repository at this point in the history
this allows running the same dockerfile with both master and final branches of Kopano Groupware Core

Signed-off-by: Felix Bartels <[email protected]>
(cherry picked from commit a40db47)
  • Loading branch information
fbartels committed Sep 2, 2019
1 parent 0a7eb73 commit 7717fcf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/start-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ grapi)
esac
# cleaning up env variables
unset "${!KCCONF_@}"
exec kopano-grapi serve --backend="$GRAPI_BACKEND"
# the backend option is only available in more recent versions of grapi
grapiversion=$(dpkg-query --showformat='${Version}' --show kopano-grapi)
if dpkg --compare-versions "$grapiversion" "gt" "10.0.0"; then
exec kopano-grapi serve --backend="$GRAPI_BACKEND"
else
exec kopano-grapi serve
fi
;;
kapi)
if [ "$KCCONF_KAPID_INSECURE" = "yes" ]; then
Expand Down

0 comments on commit 7717fcf

Please sign in to comment.