# -*- mode: shell-script -*-


CONFIG_FILE=/data/gitea/conf/app.ini


ini() {
    local action="$1"
    shift
    crudini "--$action" "$SERVICE_DATASTORE$CONFIG_FILE" "$@"
}


gitea_config_hash() {
    config_hash=$(cat "$SERVICE_DATASTORE$CONFIG_FILE" | md5_compat) || exit 1
    init-config-add "
$MASTER_BASE_SERVICE_NAME:
  labels:
    - compose.config_hash=$config_hash
"

}