#!/bin/bash

set -e
set -o pipefail

# Increment this whenever you make a change, otherwise it won't be re-executed!
VERSION=26

. /usr/share/univention-lib/all.sh
. /usr/share/univention-appcenter/joinscripthelper.sh

joinscript_init
eval "$(ucr shell)"

# Best practice: Adds the service to the host. Then LDAP can be queried
# to lookup where the app is already installed. Also useful for unjoin
ucs_addServiceToLocalhost "${APP}" "$@"

# when everything worked fine, tell the system that this VERSION does
# not need to be run again
joinscript_save_current_version

exit 0